Tuesday, January 17, 2012

Set PATH for JDK 7 on Windows 8

You can run the JDK without setting the PATH environment variable, or you can optionally set it so that you can conveniently run the JDK executable files (javac.exe, java.exe, javadoc.exe, and so forth) from any directory without having to type the full path of the command.

To setup PATH in Windows 8:
Run Control Panel in Windows 8's Metro UI


Click More Settings in Control... on the left.


Search "Environment Variables" in Control Panel, and click "Edit the system environment variables".


Click on "Environment Variables..."


Scroll down to highligh and edit path items.


My full path of the bin folder of the JDK is:
C:\Program Files\Java\jdk1.7.0_02\bin

So add ";C:\Program Files\Java\jdk1.7.0_02\bin" in the path string.


Click OK... to finish.

Re-open Windows 8's "cmd" window, now i can start java and javac in anywhere.



Updated@2013-01-17: Set PATH environment variable to JDK on official Windows 8

No comments:

Post a Comment