title: Java classpath command line with opencsv writer
body: <p>How to include all jar files in Java? I'm using command prompt.</p>
  
  <p>My jar files is stored on C:\test\java</p>
  
  <p>jarfiles is:</p>
  
  <pre><code>commons-io.jar, commons-lang.jar, opencsv.jar
  </code></pre>
  
  <p>And my java program is also stored on C:\test\java</p>
  
  <p>I've searched on google but it seems I cannot find the proper way of using classpath.</p>
  
  <p>I'm currently on C:\test\java and using this command </p>
  
  <blockquote>
    <p>javac -cp ".;commons-io.jar;commons-lang.jar;opencsv.jar;" JavaTest.java</p>
  </blockquote>
  
  <p>And it's compiling successfully but when I run my java program with this line</p>
  
  <blockquote>
    <p>Java JavaTest</p>
  </blockquote>
  
  <p>I'm having a error with the opencsvWriter.</p>
  
  <pre><code>Exception in thread "main" java.lang.NoclassDefFoundError: au/com/bytecode/opencsv/CSVWriter
  </code></pre>
  
  <p>I cannot determine if classpath is wrong or on the writer is wrong.</p>
  
  <p>Thanks in advance!</p>