WINDOWS7 environment variable setting for installing JDK Javac is not an internal command or external command

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.