PATH can be set using the system utility in the Windows Control Panel or by using the Linux and Solaris shell startup file. On computers running Windows or Mac OS X, you do not normally need to make changes to PATH. If you can't configure it, you can use or read tutorial on this topic https://docs.oracle.com/javase/tutor...ent/paths.html.
Last edited by Rabbit; May 10 '18, 05:03 PM.
Reason: removed advertisement link
I'm using Windows 8.1, and I have both JDK6 and JDK8 installed. For development purposes, I needed to get the java version "1.6.0_45" at the command java -version and javac 1.6.0_45 over javac -version. The second command worked as expected after installing JAVA_HOME as the JDK6 start folder and adding% JAVA_HOME / bin% to Path. However, the first command still returned the java version "1.8.0_71"
Solution was necessary for my programing
Troubleshoot problems
I could find an entry in the Path environment variable that points to C: \ ProgramData \ Oracle \ Java. This folder actually contains a short link to java.exe JDK8.
The Correct Solution: Remove JDK 8
Workaround: edit the short message file so that it points to java.exe inside% JAVA_HOME% \ bin (Please replace the variable with the actual folder)
Last edited by Rabbit; May 10 '18, 05:02 PM.
Reason: removed advertisement link
You should follow the following steps to set the java path:
1) Type advanced system setting in the serach field
2) Click on the View advanced system settings
3) System property windows will get open, then click on Environment Variables
4) In system variables click on the New button and enter JAVA_HOME as varible name and the path of your java JDK directory in Variable value
5) Update System PATH by select path under System varibales
6) Then click on Edit
7) In the Edit Environment Variable window click on New
8) then type in %JAVA_HOME%\bin
9) Tests your configuration by opening a new command prompt and type in "echo %JAVA_HOME%" then type in it: "javac -version" to check the java version
Comment