Install java in window system (recommended java related video courses: java video tutorial)
Download JDK
First we need to download the java development tool kit JDK, download address: 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 system. This article takes the Window 64-bit system as an example:
After downloading the JDK The installation is carried out according to the prompts. When installing the JDK, the JRE will also be installed. Just install it together.
Install JDK. During the installation process, 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 the installation is complete, right-click "My Computer", click "Properties", and select "Advanced System Settings";
2. Select the "Advanced" tab and click "Environment Variables";
Then the following will appear: Screen:
Set 3 properties in "System Variables", JAVA_HOME, PATH, CLASSPATH (case does not matter), if it already exists, click "Edit", no If it exists, click "New".
The variable setting parameters are as follows:
Variable name: JAVA_HOME
Variable value: C:\Program Files (x86)\Java\jdk1.8.0_91 // According to your own Actual path configuration
Variable name: CLASSPATH
Variable value: .;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar; //Remember the previous "."
Variable name: Path
Variable value: %JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;
JAVA_HOME settings
PATH Settings
##CLASSPATH SettingsThis is the Java environment configuration. After the configuration is completed, you can start Eclipse to write code, and it will automatically complete the Java environment configuration.
Test whether the JDK is installed successfully
1. "Start"->"Run", type "cmd";2. Type the command : java -version, java, javac several commands, the following information appears, indicating that the environment variable configuration is successful; For more java related articles, please pay attention tojava basic tutorial column.
The above is the detailed content of How to install java. For more information, please follow other related articles on the PHP Chinese website!