eclipse - Setting Classpath but Java program(using Apache external jar) doesnt run on CMD Line -


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.):

classpatherror

works fine in eclipse though:

eclipserun

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

folderstructure

here .jar file import stringutils:

jar folder

what cannot find symbol mean?

-----------------------after rajesh's answer------------------------------------

2nderror

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