Compilation error with external Jar
<p>I am trying to command line compile my code and I cannot get it to run properly. My project was in eclipse and i could specify the location of a jar file to include but the command line is another issue. All .java and the .jar file are in the same director. </p>

<p>I can compile with</p>

<pre><code>javac -classpath opencsv-2.3.jar *.java
</code></pre>

<p>I get the following exception if I try to run my code. </p>

<pre><code>java ClassificationGenerator
</code></pre>

<p>Exception in thread "main" java.lang.NoClassDefFoundError: au/com/bytecode/opencsv/CSVReader</p>

<p>I tried running the code with </p>

<pre><code>java -classpath opencsv-2.3.jar ClassificationGenerator
</code></pre>

<p>but then i get </p>

<p>Exception in thread "main" java.lang.NoClassDefFoundError: ClassificationGenerator
Caused by: java.lang.ClassNotFoundException: ClassificationGenerator
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)</p>
