How to set jar files in classpath

Hi there,

Please help. How do i set jar files in classpath?

Thanks a lot.
zizi21Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
jax79sgConnect With a Mentor Commented:
If you did it on the OS level, the compiling would have used them if they are included in the OS CLASSPATH.

I would recommend that you use IDEs such as eclipse.
0
 
jax79sgCommented:
On Windows you can use following command line. Just append your jar. All java runtimes will refer to this line on top of their own.
set CLASSPATH=myfolder/jar1.jar;myfolder/jar2.jar;myfolder/jar3.jar

Or,

When you run the java code.
java -classpath myfolder/jar1.jar myapp.main
0
 
zizi21Author Commented:
But when i compile the code, shouldn't i add the jar files as well? Thanks so much.
0
 
zizi21Author Commented:
let me install eclipse now ....
0
 
zizi21Author Commented:
thanks a lot
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.