Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to set the class path

 
prasanna perera
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic