Home > Java > Javagetting Started > body text

How to configure environment variables in java

爱喝马黛茶的安东尼
Release: 2019-11-15 09:48:59
Original
10916 people have browsed it

How to configure environment variables in java

First install jdk, click to open the window shown below.

How to configure environment variables in java

Click "Next" in the picture above to enter the picture below. The red box in the picture below indicates the installation path.

How to configure environment variables in java

Click on the image above to proceed to the image below, and click "Finish".

How to configure environment variables in java

Configure the java environment variables below, right-click the computer icon, as shown below:

How to configure environment variables in java

After clicking on the properties above , the system window will pop up, click the "Advanced System Settings" button pointed by the red arrow on the far left to pop up the "System Properties" window, click "Environment Variables" pointed by the middle arrow in the system properties window, and the environment variables window will pop up.

How to configure environment variables in java

Click the New button pointed by the red arrow in the figure below, the "New System Variable" window will pop up, set the variable name: JAVA_HOME, variable value: C:\Program Files (x86) \Java\jdk1.8.0_121

How to configure environment variables in java

New variable name: CLASSPATH, variable value: .;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools .jar;

How to configure environment variables in java

Edit the variable Path and append ":%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;" after the Path variable value.

How to configure environment variables in java

Finally, open the command window and enter "java -version". If the version information is output, the java environment variable is configured successfully.

How to configure environment variables in java

Many java training videos, all on the PHP Chinese website, welcome to learn online!

The above is the detailed content of How to configure environment variables in java. For more information, please follow other related articles on the PHP Chinese website!

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!