If providing the full path does not work, then the problem might be in the installation rather than the PATH variable. If it does work, then are you starting a new Command Prompt session after setting the PATH variable?
Note: Here are Sun's instructions for installing 1.4.2 on Windows, although what you described in your original post appears correct...
[ October 11, 2005: Message edited by: marc weber ]
Go back to the my computer->properties->advanced->environment variables window, and in its top half, find classpath and edit it.
There will be several classpaths already set up, separated by semicolons ; on Windows. You need to set up the classspath for current folder, which looks like this . a single full stop (dot).
If there isn't somewhere in your classpath variable a dot (mine looks like this:
) or more likely
somewhere in the classpath variable, you have to insert it, simply by putting your cursor (insertion point) just next to one of the semicolons already there, and changing the ; to read
between the strings already there.
Then click OK and keep doing so until all the dialog boxes vanish . . .
Originally posted by Campbell Ritchie:
Have you set both path and classpath? If you have only set path, it won't work.
That is not true. Beginners should NOT deal with the CLASSPATH unless other software on the same system is using it. You can compile and run programs just fine without the CLASSPATH set.
[ October 14, 2005: Message edited by: Layne Lund ]
Welcome to Java Ranch!
If your are still having problems, please provide us some more information. First of all, how do you know that Windows cannot find javac and java? Do you get an error message? If so, please post it here.
Also, run the following commands to see what happens:
Please paste the output here and I will be glad to help you from there.