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