Configuration of the JDK environment variable

Source: Internet
Author: User

Windows7 Installing the JDK environment variable settings Windows7 X64 Install "Jdk-6u26-windows-x64.exe", set the environment variable according to the environment variable setting method on the network, but the dead and alive all prompt "Javac is not an internal command or external command, Also not 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: Install Jdk-6u26-windows-x64.exe, the path is the default path (D:\Program files\java\jdk1.7.0_71), and the next step is until the installation is complete.


Step Two: Set environment variables:
1, enter the environment variable setting method, here only for Windows7, other children's shoes to the internet to find: "Computer" right "properties"--"Advanced system Settings"-"Advanced"-"Environment variables" Open environment variable Settings window.
2. In the "System Environment variables" Setting window below, click "New" to create the Java_home variable:
Variable name: java_home
Variable Value: D:\Program files\java\jdk1.7.0_71
3. In the "System Environment variables" Setting window below, click "New" to create the CLASSPATH variable:
Variable name: CLASSPATH
Variable value: D:\Program files\java\jdk1.7.0_71\lib\dt.jar;d:\program Files\java\jdk1.7.0_71\lib\tools.jar; (Note semicolon)

4. In the System Environment Variables setting window below, double-click the "PATH" variable and add it after the value of the variable:;D: \program Files\java\jdk1.7.0_71\bin; (Note semicolon)
Step three: In "Run" input cmd, enter, open the Command window, enter Javac, 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

Configuration of the JDK environment variable

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.