Yes, this is for the compilation. I set the classpath using environment variables but that is not what I need now. I heard there is a way to set the class path temporarily using CMD. How to do that and for how long that path will last?
Rob Spoor wrote:How about javac -cp C:\TomCat\lib\servlet-api.jar;. ..., with the ... replaced with your regular compiler flags and arguments?
Hi! Thanks for the comment. Anyway what about "set classpath ;C:\TomCat\lib\servlet-api.jar" ???
I am trying to use this way because when I set the PERMANENT classpath, all other non web based java programs I created wont run. The simply simply throws "Cannot find File" or something like that. This is not happening only to me, happening to everyone of us in our class, and has happened to all my 3 computers.
Campbell Ritchie wrote:You can often do more harm than good by setting a system classpath.
Can’t you set a classpath by writing set CLASSPATH=.;c:\etc at the command line? Then you have a classpath for your current session, which will vanish when you close the command line.
Finally, the answer I am seeking for... .. Thanks for the help.. Please do me some more favor. Could you please write the complete command? I have given the path of my jar files. Then I can coppy and paste your command and stay away from trouble. Please help..