This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am running Windows XP and I set the value of the Path variable to C:\j2sdk1.4.2_09\bin in both the user variables and system variables, and I cannot get the command prompt to recognize javac or %java. I cannot figure out what I did wrong, I followed the installment instruction and it still failed. Can someone please help.
Does the install work without the PATH variable? That is, what do you get when you enter the full path at the prompt? For example...
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...
Also, if you're running on windows, you want to type C:\>java not C:\>%java
JavaBeginnersFaq "Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Joined: Oct 09, 2005
When I set the path I opened the control panel. Then I went to systems and clicked on the advanced tab then clicked on enviroment variables. Then I went to system variables and User variables and under the path I typed in the java pathat the end of the list of the variable value.
Have you set both path and classpath? If you have only set path, it won't work. 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:
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.