Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to set jar files in classpath

Posted on 2013-05-11
5
Medium Priority
?
419 Views
Last Modified: 2013-05-12
Hi there,

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

Thanks a lot.
0
Comment
Question by:zizi21
  • 3
  • 2
5 Comments
 
LVL 7

Expert Comment

by:jax79sg
ID: 39158893
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
 

Author Comment

by:zizi21
ID: 39159094
But when i compile the code, shouldn't i add the jar files as well? Thanks so much.
0
 
LVL 7

Accepted Solution

by:
jax79sg earned 2000 total points
ID: 39159148
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
 

Author Comment

by:zizi21
ID: 39159158
let me install eclipse now ....
0
 

Author Closing Comment

by:zizi21
ID: 39159183
thanks a lot
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This video teaches viewers about errors in exception handling.
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question