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.

[452 byte] By [paranoidboytoya] at [2007-10-2 6:37:38]
# 1
Go here http://java.sun.com/j2se/1.5.0/docs/tooldocs/index.html#generaland read these topics:Setting the ClasspathHow Classes are Found Javac (tool)java (tool)They all have information on the subject.
ChuckBinga at 2007-7-16 13:45:36 > top of Java-index,Developer Tools,Java Compiler...
# 2
if you're using windows, the filepath will include an ending slash " \ " and java won't know what to do with it.
Giordano_Brunoa at 2007-7-16 13:45:36 > top of Java-index,Developer Tools,Java Compiler...
# 3

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.

killerCodingNinjaMonkeya at 2007-7-16 13:45:36 > top of Java-index,Developer Tools,Java Compiler...
# 4

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

Pradhipa at 2007-7-16 13:45:36 > top of Java-index,Developer Tools,Java Compiler...