title: Import custom libraries in Java
body: <p>I need to import a Java class in my project. The class I need to import is in a JAR file with
  absolute path <code>~/Documents/mylib/stdlib.jar</code></p>
  
  <p>Now in my source file (Test.java) I am using</p>
  
  <p><code>import stdlib.*;</code></p>
  
  <p>and I am compiling with
  <code>javac -classpath ~/Documents/mylib/stdlib.jar Test.java</code></p>
  
  <p>And it is showing the error that stdlib does not exist.</p>
  
  <p>Is my import statement correct or is there anything wrong with classpath?
  Shouldn't this import statement import all the classes present in the JAR file?</p>
  
  <p>I am not using any IDE and my OS is Linux.</p>