Jump to content

Classpath not staying put!


megavan
 Share

Recommended Posts

Everytime I set classpath via command prompt it remains set only as long as that instance of cmd is running. But when I close cmd and open it again and then echo the classpath I get nothing. How do I remedy this? Also, I don't want to set it via control panel since I'm required to do it using a bat file. Thanks :)

Link to comment
Share on other sites

First of all, this is a linux question and not in any way related to Java programming.Now, to answer your question. When you compile something with the -classpath parameter, it's not permanent. As you said, every time you type the command in you will have to type the classpath again. What we use here is "ant" which is a build tool that automates the compiling of the entire directory. Why don't you just use a batch file or something like ant? Even with our huge codebase it only takes at most 20 seconds for a complete compile.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...