WIN10 64-bit JDK installation

Download JDK from the official website, address: http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html

Here I installed jdk-8u91-windows-x64
Note that here is the 64-bit WIN10 operating system, 32-bit WIN operating system, please download jdk-8u91-windows-i586 As for MAC, please download the corresponding version
1.
Install JDK

Here I suggest the default address (install it in another disk, I will say next) and keep pressing the next step, and a JRE installation window will pop up later, still default to the end, I will not post a picture in this step, anyway, keep clicking next to the Just close it
2.
Plug it in, here is the fork point that is different from other experiences

If you want to install on another disk, you need to install it before

Create a new folder named java in the disk to be installed (such as D disk), and then create two folders named jdk1.8.0_91 and jre1.8.0_91 under the java folder, and then install JDK Select the address to the folder named jdk1.8.0_91, click Next, wait until the pop-up to install JRE, select the address as D:\java\jdk1.8.0_91

Note: The address here is actually similar to the default (default address C:\Program Files\Java\jdk1.8.0_91 ;C:\Program Files\Java\jre1.8.0_91), many people make mistakes in this step It leads to confusion. In fact, JDK and JRE are not directly installed in the same directory. You must create a new folder in the same directory and install them in the new folder.
3.
Then set the environment variable:

Right-click My Computer on the desktop → Properties → Advanced System Settings → Advanced Options → Environment Variables → New 3 variables in User Variables:

Variable name: CLASS_PATH

Variable value: .;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar

Variable name: JAVA_HOME

Variable value: C:\Program Files\Java\jdk1.8.0_91 (do not use brackets, here is the address of the installation directory of your JDK)

variable name: PATH

Variable value: .;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin
Of course, it can also be set in the system variable, but I still recommend setting
4
in the user variable. Then test it

WIN key + R

enter cmd

Enter JAVAC and press Enter

The following picture pops up, it is successful

Otherwise, it will fail. Go back to the third step and see more there. Most of the errors are there.

I hope my humble opinion can help you~❤

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325686020&siteId=291194637