Transferred from: http://bbs.gfan.com/android-5941970-1-1.html
Windows7installationJDKsettings for Environment variables Windows7 X64Installation "Jdk-6u26-windows-x64.exe, the environment variables are set according to the environment variable setting method on the Internet, but the dead and alive are prompt "Javacis not an internal command or external command, or a program or batch file that can be run. " Toss for a while, still this question. After surfing the internet for a long time, finally found a solution, and pro-Test available, now finishing as follows, hope to be useful for children's shoes door.
First step: InstallJdk-6u26-windows-x64.exe, the path is the default path, and the next step is until the installation is complete.
Step Two: Set environment variables:
1, Enter the environment variable setting method, which is only forWindows7, other children's shoes online search: Computer Right-click Properties--Advanced system settings--advanced--environment variables to open the environment variable Settings window.
2, in the "System Environment variables" Setting window below, click "New" to createJava_homevariables:
Variable Name:Java_home
Variable Value:C:\Program files\java\jdk1.6.0_26
3, in the "System Environment variables" Setting window below, click "New" to createCLASSPATHvariables:
Variable Name:CLASSPATH
Variable Value:C:\Program Files\java\jdk1.6.0_26\lib\dt.jar; C:\Program Files\java\jdk1.6.0_26\lib\tools.jar; (note semicolon)
4, in the System Environment Variables Settings window below, double-click thePATH"variable, added after the value of the variable: ; C:\Program Files\java\jdk1.6.0_26\bin; (Note Semicolon)
Step three: Enter in "Run"cmd, enter the command window after entering theJavac, if it appears:
that means the installation configuration is correct.
if it appears:
Unfortunately, children's shoes have to continue to work, please look down:
After installing the JDK, setting the environment variable, entering the Javac command in CMD is not available, prompting "Javac is not an internal command or external command, is not a running program or batch file" but the input java-version can display the JDK version number correctly , indicating that the Java command is available. After I enter Java-home, I find that the path is completely wrong, the environment variable setting does not work, I do not know why.
Solution:
Run-->cmd
Run the following command in the console to set the Java environment variable to resolve:
Set Java_home=c:\program files\java\jdk1.6.0_26 Install the root directory of the JDK
Set Classpath=%java_home%\lib\tools.jar;%java_home%\lib\dt.jar;
Set Path=%java_home%\bin;
Note: input is case-insensitive, plus several Java commands attached
Java-help can view commands
Java-home Viewing the JDK installation path
Java-version View JDK version