Java development environment configuration
Installing Java in Windows system
Download JDK
First, we need to download the java development kit JDK at: http://www.oracle.com/technetwork/java/javase/downloads/index.html , click the following download button:
On the download page, you need to choose to accept the license and select the corresponding version according to your own system. This paper takes window 64 bit system as an example:
After downloading, the JDK will be installed according to the prompts, and JRE will also be installed when installing the JDK. Just install it together.
During JDK installation, you can customize the installation directory and other information. For example, we choose the installation directory as C: \ program files (x86) \ Java \ jdk1 8.0_ 91。
Configure environment variables
1. After installation, right-click "my computer", click "properties" and select "advanced system settings";
2. Select the "advanced" tab and click "environment variables";
Then the following screen will appear:
Set 3 properties in "system variable", Java_ Home, path, classpath (case doesn't matter). If it already exists, click Edit. If it doesn't exist, click new.
The variable setting parameters are as follows:
JAVA_ Home settings
Path settings
Note: in Windows 10, the path variable is displayed in bars. We need to add% Java_ HOME%\bin;% JAVA_ HOME%\jre\bin; Add separately, otherwise it cannot be recognized:
%JAVA_HOME%\bin; %JAVA_HOME%\jre\bin;
Classpath settings
Note: if you use JDK of version 1.5 or above, you can compile and run Java programs normally without setting the classpath environment variable.
Test whether the JDK is installed successfully
1. "Start" - > "run", type "CMD";
2. Type the commands: Java - version, Java and javac. The following information appears, indicating that the environment variable configuration is successful;