so followed couple of tutorials , trying run java program on cmd line external jar. know there plenty of questions this, after trying code suggested 2 errors.\
its simple program called "hellojar.java" , utilized apache commons lang string utils.
error see (as can see set classpath , run it.):

works fine in eclipse though:

folder structure (in jars jar necessary , in src project need):

here .jar file import stringutils:

what cannot find symbol mean?
-----------------------after rajesh's answer------------------------------------

problem here is, jar's not set in classpath , results in compilation errors:
as per path shared, command compile should :
cd c:\users\controlled\documents\eclipse_projects\helloworld\src
javac -cp .;c:\users\controlled\documents\eclipse_projects\helloworld\jars\* hellojar.java command run java program above path:
java -cp .;c:\users\controlled\documents\eclipse_projects\helloworld\jars\* hellojar
Comments
Post a Comment