JDK12 mounting structures

JDK12 mounting structures

A, JDK download

1, JDK official website Download: https://www.oracle.com/technetwork/java/javase/downloads/jdk12-downloads-5295953.html
2, select: "the Accept License Agreement"
3, the downloaded file: jdk -12.0.1_windows-x64_bin.exe

jdk12 Download

Two, JDK installation

1, click on the "jdk-12.0.1_windows-x64_bin.exe" pop Setup Wizard page, click "Next";

Installation 1

2, can be customized to select JDK installed in the target folder (to default), to select "Next";

Installation 2

3, select "Off"

Installation 3

Third, configure the environment variables

1, before JDK installation directory looks like this:

jdk installation directory

2, generate JRE: After installation JDK12 computer, found no new version of the JRE JDK12 after the installation is complete, run the following command to generate JRE: bin \ jlink.exe --module-path jmods --add-modules java.desktop --output jre jre command generated manually.

Installation jre

3, after the installation is under the JDK directory like this:

After the installation directory jre

4, note:

JRE generated command (1) above, when operating, CMD window displayed path is: C: \ Program Files \ Java \ jdk-12.0.1>:, running command: bin \ jlink.exe - module- path jmods --add-modules java.desktop --output jre, operating position and the path must be consistent.

(2) the use of the best run as an administrator at the time of start cmd command line.

Fourth, configure the environment variables

1. Enter the environment variable configuration interface

  • Method 1: Right-click Computer -> Properties -> Advanced System Settings -> Advanced -> Environment Variables
  • Method 2: win + R -> type sysdm.cpl and Enter -> Advanced -> Environment Variables

2. Add the environment variable

variable name variable
JAVA_HOME C:\Program Files\Java\jdk-12
Path %JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;

note:

1, "C: \ Program Files \ Java \ jdk-12" folder address is the JDK installation position
2, from the beginning of significant changes in JDK 9 - - - "before the class and resource files are stored in the lib / rt.jar , tools.jar, JDK 9 version began lib / dt.jar and various other internal JAR files are stored in a more efficient file format in the lib directory implementation-specific, so no need to configure CLASSPASTH variables. "

Environment Variables 1

Environment Variables 2

Fifth, check JDK configuration

Keyboard "Win + R" shortcut key to bring up the "Run", type "cmd", at the command prompt, type "java -version"

Jdk detect whether the installation is successful

The successful completion of the above steps to build and install the JDK environment variables! ! !

Guess you like

Origin www.cnblogs.com/littlepage/p/11332324.html