title: How to set CLASSPATH in Linux to let java find jar file?
body: <p>Under Linux I am trying to run a jar file as follows: </p>
  
  <pre><code>java -jar plantuml.jar -testdot
  </code></pre>
  
  <p>while having <code>CLASSPATH</code> set to any of the following (the file is located at <code>/home/user/plantuml.jar</code>):</p>
  
  <pre><code>export CLASSPATH=/home/user
  export CLASSPATH=/home/user/
  export CLASSPATH=/home/user/plantuml.jar
  </code></pre>
  
  <p>In either case, no matter how I define <code>CLASSPATH</code>, the <code>java</code> command gives an error <code>Unable to access jarfile plantuml.jar</code>. What am I doing wrong here?</p>