Shohruh Sg wrote:I set new JAVA_HOME C:\Program Files\Java\jdk1.7.0_13\ and PATH %JAVA_HOME%\bin;C:\Program Files\Java\jdk1.7.0_13\bin to the instructed place
Strangely, when I type set path or echo %PATH% on command window, it's displaying the following PATH=C:\Program Files\Java\jdk1.7.0_13\\bin;C:\C:\Program Files\Java\jdk1.7.0_13\bin
Joanne
Joanne Neal wrote:
Note the \\ in your PATH setting. Try removing the \ form the end of your JAVA_HOME setting or remove the \ from the %JAVA_HOME%\bin in your PATH setting.
You've also got C:\C:\Program Files\Java\jdk1.7.0_13\bin in your PATH setting which is why it didn't pick up javac from that part of the PATH variable.
Campbell Ritchie wrote:What happened to the PATH value from before you installed Java? It points to things like C:\win32 and C:\System. Have you removed them from your PATH?
Maybe the spaces in the PATH are confusing the computer. Try adding quote marks: not C:\Program Files\Java\jdk1.7.0_13\bin but "C:\Program Files\Java\jdk1.7.0_13\bin". Be sure to add the Java path component at the beginning of the PATH.
Use Window Explorer to confirm that the files java.exe and javac.exe are inside that bin directory.
K. Tsang CEng MBCS PMP PMI-ACP OCMJEA OCPJP
Campbell Ritchie wrote:If there was no PATH beforehand, then you have not done any harm by deleting anything.
Did you try adding ""? Don’t add %%.
Which version of Windows are you using?
Please search in the root directory of C for a file called AUTOEXEC.bat, and inspect that, if it exists.
K. Tsang wrote:You adding PATH in the system variable settings (which should have C:\Windows\system32 stuff) or in the user environment (default no PATH variable)?
If JAVA_HOME variable is created, you can use this variable in the PATH variable.
Shohruh Gulyamov wrote:Oh finally, problem solved - I corrected the error and ran the java compiler and made Hello World appear on display. The problem was - .COM was missing in PATHEXT. Previously, PATHEXT contained these EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH; and I checked PATHEXT values on google and added .COM to the values. Then It started working.
Thanks a lot for your responses, surely without them I would not be able to correct it!
Campbell Ritchie wrote:Welcome to the Ranch
The final solution was to add .com
What is the PATH on your computer?
Campbell Ritchie wrote:Please have a look at our FAQ, which tells you about setting the PATH, before you do something which will damage your computer.
Campbell Ritchie wrote:Well done
Campbell Ritchie wrote:That sounds serious. You can’t get anywhere without java.lang.Object. Please print your PATH and CLASSPATH with
echo %PATH%
echo %CLASSPATH%
Which old app has stopped working? Do new Java programs run?
Danger, 10,000 volts, very electic .... tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|