Once I installed JDK 8, I am not succeeding to set the Command Prompt to the JDK 7 again, on Windows 7.
I have already set the system environment properties for both JAVA_HOME
and PATH
, to point to JDK7 and my JDK7/bin
folder and I also restarted the SO and every time I open a new command prompt and run java -version
I am always getting the version 8 of Java.
In Java Environment Settings I also have the JDK 7 enabled.
How can I configure my command prompt for the JDK 7 again?
An answer based on the comments.
java.exe
is installed into the %SystemRoot%\system32
directory and this java
runs the version of Java based on your registry. If you want to override this version of Java, you need to ensure not only that it is in your PATH
, but it must appear before your %SystemRoot%\system32
otherwise only additional commands like javac
or jar
use the version you expect. (As these are not in System32
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With