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
Two, JDK installation
1, click on the "jdk-12.0.1_windows-x64_bin.exe" pop Setup Wizard page, click "Next";
2, can be customized to select JDK installed in the target folder (to default), to select "Next";
3, select "Off"
Third, configure the environment variables
1, before JDK installation directory looks like this:
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.
3, after the installation is under the JDK directory like this:
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. "
Fifth, check JDK configuration
Keyboard "Win + R" shortcut key to bring up the "Run", type "cmd", at the command prompt, type "java -version"
The successful completion of the above steps to build and install the JDK environment variables! ! !