search
HomeJavaJavagetting StartedHow to set java environment variables

How to set java environment variables

Dec 05, 2019 pm 01:50 PM
javaenvironment variablesset up

How to set java environment variables

JAVA_HOME environment variable setting

First right-click [Computer] and enter [Properties] and then select [Advanced System Settings]

How to set java environment variables

Click to enter [Environment Variables] in [Advanced] to enter the environment variable editing interface

How to set java environment variables

Click [System Variables] below 】, the JAVA_HOME variable does not exist, then we need to click [New]

How to set java environment variables

Variable name input: JAVA_HOME

Recommended learning video tutorial: java video tutorial

The variable value refers to the actual installation path (for example, the editor's path is: C:\Program Files\Java\jdk-9), and finally click OK.

PATH variable setting

Also in [System Variables] we can see that the path variable already exists, then we only need to click [Edit] to enter the path variable Edit

How to set java environment variables

The variable name remains unchanged, the variable value is changed to [%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;], and finally click OK

How to set java environment variables

Classpath variable setting: There is no need to set classpath after java1.5 version

Similarly, there is no Classpath variable in the system variables. Click to enter [New]

How to set java environment variables

Type the variable name [Classpath]

Type the variable value [.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME %\lib\tools.jar; ]

Be careful not to miss the symbols in the variable value, and finally click OK

How to set java environment variables

Test whether the configuration is successful

Similarly, search [cmd] in [Start], and then type [java] and [javac].

The message shown in the figure appears, indicating that the configuration is successful.

How to set java environment variables

How to set java environment variables

java learning tutorial recommendation: java quick start

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

Statement
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.