Link to home
Start Free TrialLog in
Avatar of zizi21
zizi21

asked on

How to set jar files in classpath

Hi there,

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

Thanks a lot.
Avatar of Jax Tan
Jax Tan
Flag of Singapore image

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
Avatar of zizi21
zizi21

ASKER

But when i compile the code, shouldn't i add the jar files as well? Thanks so much.
ASKER CERTIFIED SOLUTION
Avatar of Jax Tan
Jax Tan
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of zizi21

ASKER

let me install eclipse now ....
Avatar of zizi21

ASKER

thanks a lot