java.com
How do I set or change the PATH system variable?
Close all remaining windows by clicking OK. Reopen Command prompt window, and run your java code. Mac OS X. To run a different version of Java, either specify the full path, or use the java_home tool