JDK Environment configuration: JAVAC is not recognized as a internal or external command, operable program or batch file

Source: Internet
Author: User

I believe everyone in the configuration testng, the first to confirm the installation of the JDK is correct, two commands are indispensable.

Open ' cmd '--

1. Enter ' Java-version ' to return to the current Java home path.

Java Version "1.8.0_11"
Java (TM) SE Runtime Environment (build 1.8.0_11-b12)
Java HotSpot (TM) 64-bit Server VM (build 25.11-b03, Mixed mode)

2. Enter ' Javac-version ' to return the JDK version currently in use by the Java compiler.

Javac 1.8.0_11

This time, a lot of novice will encounter a problem, about Javac can not find: Javac is not recognized as a internal or external command, operable program or batch file

General inspection of two places.

First, to the environment variables, the system environment variable is called "Java_home" is configured to the latest JDK, can not point to the JRE Oh!

The second is to the environment variable, check if "PATH" is configured correctly.

The steps are as follows:

Step one: Turn on the computer--Properties--Advanced system settings.

Step Two: Advanced-environment variables

Step Three: Configure "java_home" = C:\Program files\java\jdk1.8.0_11 (I use the 1.8.0_11 version, now seems to be 144, it doesn't matter, anyway to your C disk find your latest JDK version, add in)

Re-configure "CLASSPATH" =%java_home%\lib;%java_home%\jre\lib;

Step Four:

New "variable name" Classpath in the start position of the Variable value text box.; %java_home%\lib;%java_home%\lib\tools.jar "(Note that there is a point first) the setting is complete, click OK.

Everything's OK. Finally, make sure your java_home configuration points to the JDK, not the JRE. Try it again!

Confirm Java_home configuration: Echo%java_home%

JDK Environment configuration: JAVAC is not recognized as a internal or external command, operable program or batch file

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.