GeeCON Prague 2014*
The moose likes Beginning Java and the fly likes How to set the class path Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to set the class path" Watch "How to set the class path" New topic
Author

How to set the class path

prasanna perera
Greenhorn

Joined: Oct 05, 2000
Posts: 16
How do I set the class path to include a new jar that I downloaded ? I do not know where to find the file that has the class path information. I have Visual Caf� Professional Edition Version 3.0C installed. I want to use the jar file that I down leaded when I am running java programs from Visual Caf� as well as when I am running a program from the dos prompt.
Thanks in advance!
Paul Stevens
Ranch Hand

Joined: May 17, 2001
Posts: 2823
What operating system are you running? 98 AutoExec.bat NT the environment settings. I would suggest going to the Sun Java tutorial. http://java.sun.com/docs/books/tutorial/
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

There is the additional difficulty of some IDE's completely ignoring system CLASSPATH settings. I know that JBuilder does not touch your Autoexec.bat (9x) or Environment Variables (NT). Everything is sent in on a -classpath switch to the jvm.

Cafe, if I remember right, completely stomps all over you autoexec.bat. It should set itself up, without you needing to change anything.

If you are using a different jar from somewhere, it depends on your IDE. For JBuilder, you would add a new Library. The library jars are what are added to the -classpath during compilation. But you would also have to set it manually in your OS classpath. For other IDE's, setting it up in your system should be ok.
 
GeeCON Prague 2014
 
subject: How to set the class path