Home  >  Article  >  Java  >  How to configure java environment variables using cmd

How to configure java environment variables using cmd

王林
王林forward
2023-04-19 21:01:112469browse

1. First download the JDK package and decompress it to the corresponding location. (The default installation configuration of the exe installation package is jre environment variable, which cannot meet the requirements when compiling. It can meet the requirements when using software such as jemter)

2. Use the setx command. Be careful not to use the set command. Overriding the environment variable configuration will cause a lot of trouble. Two steps are required.

setx JAVA_HOME "C:\Program Files\Java\jdk-14.0.1"       #设置JAVA_HOME系统变量
setx Path "%PATH%;%JAVA_HOME%\bin";          #追加入PATH,不是覆盖path。注意写法总的“%”

3. After the settings are completed (reopen a cmd window) check whether the settings are correct.

What are the basic data types of java

The basic data types of Java are divided into:

1. Integer type, used to represent the data type of integer.

2. Floating point type, a data type used to represent decimals.

3. Character type. The keyword of character type is "char".

4. Boolean type is the basic data type that represents logical values.

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

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete