help on set, path and class path for J2sdk1.4.0

Having problems with a simple program HelloWorld, everytime I compile and then run the program and I don't see it working. I thought it probably woiuld be the classpath. I am using the Window xp. please give me simple instruction on the above.Johanna CHristian
[275 byte] By [J0329a] at [2007-9-27 5:07:37]
# 1

This link tells you how to set Path.

http://java.sun.com/j2se/1.4/install-windows.html#Environment

Follow the instructions for NT/XP.

For Classpath, its the same basic steps except you will need to Add a new User variable if Classpath is not already defined. Be sure to add .; to the Classpath.

That said, you might not need to set the Classpath. Your post sounds like you can compile without any errors but you are getting an error when you try to run the program. If you post the exact error message, the exact command you entered, and the part of the source code that contains the class definition, we might be able to help you without messing with your environment.

For example, first time users often have the following troubles. (1) The argument to the java command is the Class Name, not a file name. If your class is called Hello then it is in a file named Hello.class and the command should be "java Hello" (2) Java class names are case sensitive - hello is different from Hello (3) Since . is the default classpath, you should CD to the directory that contains the file you are trying to execute.

atmguya at 2007-7-8 1:22:57 > top of Java-index,Developer Tools,Java Compiler...
# 2
Set the Path variable:Include C:\jdk1.4\bin in Path variable.Set the classpath variable:Include c:/jdk1.4/jre/lib/rt.jar in Classapth variable.
dvohra09a at 2007-7-8 1:22:57 > top of Java-index,Developer Tools,Java Compiler...
# 3
Set Path:set path=C:\jdk1.4\bin;%path%; Or whereever your bin subdirectory is.Set the classpath variable:set classpath=c:\jdk1.4\jre\lib\rt.jar; c:\jdk1.4\lib\tools.jar;%classpath%;Note the semi-colon separating paths and the back-slash.
sanjeevdga at 2007-7-8 1:22:57 > top of Java-index,Developer Tools,Java Compiler...
# 4

In the message right above, do you put both of these statements in the autoexec.bat file like so?

set path=C:\jdk1.4\bin;%path%;

set classpath=c:\jdk1.4\jre\lib\rt.jar; c:\jdk1.4\lib\tools.jar;%classpath%;

If so, what is and does the %path%; and the %classpath% do at the end of these statements?

stevebjua at 2007-7-8 1:22:57 > top of Java-index,Developer Tools,Java Compiler...