How do I change Java version in Java?
Control Panel → System → Advanced → Advanced. PATH can be found under System Variables by clicking on Environment Variables. Modify PATH in the Edit windows by adding the path of your jdk5/bin directory at the top. Please shut the window. Run java -version in a new command prompt window.