First, install the JDK
Java's SDK is referred to as the JDK, to its official website to download the nearest JDK.
Http://www.oracle.com/technetwork/java/javase/downloads/jdk9-downloads-3848520.html
Second, configure environment variables
Java_home Configuring the JDK installation path
PATH to configure the location of the JDK command file
CLASSPATH Configuring the location of a class library file
1. My Computer (right-click)--Properties--Advanced system settings
2. Environment variables--NEW
(1) New variable name "Java_home", Variable Value "C:\Java\jdk1.8.0_144" (that is, the JDK installation path)
(2) Edit, variable name "Path", at the end of the value of the original variable, add ";%java_home%\bin;%java_home%\jre\bin"
(3) New variable name "CLASSPATH", Variable Value ".; %java_home%\lib;%java_home%\lib\dt.jar;%java_home%\lib\tools.jar "
3. Confirm the environment configuration is correct:
In the console, enter the java,javac,java-version command separately, with the compiler information for the JDK as shown below, including information such as modifying the syntax and parameter options for the command.
Java command:
Javac command:
Java-version command:
4. Verify the first Java program under the console:
public class Test {public static void main (string[] args) { System.out.println ("Hello world!" ); }}
Write in Notepad, click "Save", and deposit the C packing directory, enter Javac Test.java and Java Test command, you can run the program (print out the result "Hello Java"). Note: Use the cmd command to set the current directory to the Java file directory, for example: CD C:\Users\Administrator\Desktop
At this point, the Java development environment was built successfully.
"Java 0 Basic Starter Series" DAY1 development environment Building