Home > Java > JavaBase > How to install java

How to install java

Release: 2020-07-13 16:23:16
Original
32162 people have browsed it

How to install java

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:

How to install javaOn 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:

How to install java

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";

How to install java

2. Select the "Advanced" tab and click "Environment Variables";

How to install java

Then the following will appear: Screen:

How to install java

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

How to install java

PATH Settings

How to install java

How to install java

##CLASSPATH Settings

How to install java

This 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;

How to install java

For more java related articles, please pay attention to

java 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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template