java - NoClassDefFoundError when running from the comand line -
I would like to use an external library (like Google's Guava) for my Java program, I use Eclipse, So I downloaded Peru's Jar (and source) and used it to eclipse and add to my project's workpiece.
 It works fine: I can run programs from Eclipses and export jars from Eclipse with Runable, but when I try to run directly from  bin /  dir I get an error, as I did before: 
Exception in the thread "main"
java.lang.NoClassDefFoundError: com / google / common / base / joiner
What should I do?
 If you are running a class file directly from the Project Bin directory, then you have to manually specify a classpath Can:  C: & gt; Java-ClassPath C: \ java \ MyClasses; C: \ java \ OtherClasses MyClass Here  
Comments
Post a Comment