Home >Java >javaTutorial >Getting started with java development: jdk, jre and environment variable configuration after installation

Getting started with java development: jdk, jre and environment variable configuration after installation

无忌哥哥
无忌哥哥Original
2018-07-19 10:33:272160browse

1. jdk: java development kit, java development, tool kit, for developers, which mainly includes jre, jvm, jdk source package , and the bin folder. For development, some instructions for compiling and running,

2, jre: java runtime environment, java runtime environment, for java users, which mainly includes jvm and java Basic class library at runtime

3. Environment variable configuration: Click Computer→Properties→Advanced System Settings→Advanced→Environment Variables

In the system variables,

3.1 New: JAVA_HOME variable, the variable name is JAVA_HOME, the variable value is the jdk installation directory, such as C:\Program Files\Java\jdk1.8.0_92

3.2 Modification: Path variable, the variable name is Path, Add %JAVA_HOME%\bin; to the beginning of the variable value, or add %JAVA_HOME%\bin; to the end. However, you need to pay attention to whether the last value has a ';' sign. If you do not add it yourself, note that all symbols are It is an English symbol, not a Chinese symbol, and letters recognize upper and lower case

3.3 Check: whether the configuration is successful, win r → enter cmd, and then enter the dos command, enter java -version (if it returns to the java version after running The information indicates that the configuration is successful);

3.4 The purpose of environment variable configuration: In order for the system to find the running path of the program, before setting the environment variable, we can only compile the java file running in the specified directory ( The specified directory seems to be under the jdk installation directory), but after configuring the environment variables, files placed anywhere on the computer can be compiled and run.

The above is the detailed content of Getting started with java development: jdk, jre and environment variable configuration after installation. 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