This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Adding .jar file to class path

 
ZEESHAN AZIZ
Ranch Hand
Posts: 162
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to add a file named sdk.jar in classpath. What is the procedure of adding a jar file to classpath.
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you consulted the SDK documentation? It clearly tells you how to add things to your classpath. Check it out.
 
Corey McGlone
Ranch Hand
Posts: 3271
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to Java in General (Beginner).
[ May 24, 2004: Message edited by: Corey McGlone ]
 
Chengwei Lee
Ranch Hand
Posts: 884
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by ZEESHAN AZIZ:
I want to add a file named sdk.jar in classpath. What is the procedure of adding a jar file to classpath.


Are you using Win2k & above? If you're, you'd need to set an environment variable call classpath & add the jar file path to it.
 
rahil qamar
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by ZEESHAN AZIZ:
I want to add a file named sdk.jar in classpath. What is the procedure of adding a jar file to classpath.


Hi

Right click on My computer -->properties-->Advanced-->Environment Variables. Then either create a new CLASSPATH system variable if not already present or simply add the jar file you want by editing the existing CLASSPATH variable. For instance if you want to add the jar file sdk.jar located in C:\Java\lib then add C:\Java\lib\sdk.jar in your CLASSPATH.

To initiate this classpath, close the existing command prompt window and open a new window. The classpath should take effect. You can check this by typing 'set claspath' at the prompt.

Hope this helps.

Rahil

 
Dirk Schreckmann
Sheriff
Posts: 7023
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might like to take a look at our FAQ on HowToSetTheClasspath.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic