First step: You need to install the JDK.
Jdk:
Http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Step Two: Configure environment variables, you need to configure 3 environment variables
How does the environment variable match? Look at the picture below:
In the system variable. To configure the first Java environment variable, called a java_home variable
The java_home variable does not exist by default, so you need to create a new one. Click "New"
The path variable is immediately followed by the configuration. Path is present by default. Add the following values to the front:
F:\Program Files\java\jdk1.8.0_11\bin;
The following semicolon (;) is to be separated from the following path
So the last to configure the CLASSPATH variable. Classpath is not the default. Need to add
New Classpath
Values are:.; F:\Program Files\java\jdk1.8.0_11\lib
. (dot) represents the current directory
;(semicolon) separated from the following path
So far. The environment variables for Java have been configured to complete. So how do you know that the Java environment variable is configured successfully pinched?
Win+r. Input cmd
Enter Java in the DOS interface and you'll see some hints for Java
then enter the Javac. Can still see the hint
JDK download and environment configuration in Java (mode one)