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.
0 comments:
Post a Comment