how can i figuere out my classpath variable
the tutorial is saying that i need to create and appropriate class path. i know wer to go to set it but what should i set it to. if that makes any sense. you see im trying to run the hello world program and ive tryed everything but setting the classpath variable so that the os will know were to go to look for the information but i dont really know what state the path is in and i dont know what to set it to. id greatly appreciate the support.
Open a Command Prompt window and type "echo %CLASSPATH%" on windows or "echo $CLASSPATH" on unix.
That will show you your existing CLASSPATH.
Mine looks like this:
.;C:\program files\j2sdk1.4.2_02\jre\lib\rt.jar
The Classpath contains all the jars and class folders that your program needs separated by ; (windows) and : (unix). So if your classes are in the folder: myapp\classes, then add
;myapp\classes
to the end of your classpath.
If u use Microsft Windows XP,
then right click my computer
go to properties..
Click the Advanced tab.
U can find the environment variables (e.v)
In e.v, User variables for user..click New
Enter classpath for variable and ur (java and jars) path as value.
Then u can compile from any directory..
Bye,
Pradhip