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