Is it necessary to reboot computer after changes in system variables?

I change JDK path and JAVA_HOME in system variables from one to another and after that, I open cmd and try:

java -version

and the result of version not change to another JDK.

If my memory doesn't fail me before I used changes without reboot, so that is why I ask this question. Maybe it's necessary to restart JVM? How can I do it without a reboot?


Under Windows, new processes pick up environment variable changes right away.

However, your problem probably has nothing to do with environment variables. The Windows version of JRE puts executables like java.exe, javaw.exe in the system32 folder, so unless you have your JDK before %windir%\system32 in your PATH, you'll always be running the JRE.

I would normally delete those ones in system32 and make my path point to the correct JVM installation.