Install and configure jdk on windows Server 2012 server

1. Download JDK;

1. Download directly from the official website: http://www.oracle.com/;
  2. I am using 1.8, Alibaba Cloud Disk Sharing Address: https://www.aliyundrive.com/s/u4V9x1AHL2r

2.Install jdk

Double-click to install and click Next. If you do not change the path, continue to the next step.

Insert image description here
Insert image description here
Insert image description here
Once the installation is complete, just click Close!
Insert image description here

3. Configure environment variables below

Right-click Computer or My Computer and click Properties to find the environment variables
1. Add the system variable
JAVA_HOME
C:\Program Files\Java\jdk1.8.0_181
Insert image description here
2. Edit the system variable Path
and add;%JAVA_HOME%\bin;%JAVA_HOME%\jre\ bin
Insert image description here

Insert image description here
3. Test whether the installation and configuration are successful. Use
win+R
 to enter the java, javac, and java -version commands to see if you can see the JDK compiler information;
java
Insert image description here
javac
Insert image description here
java -version
Insert image description here

Guess you like

Origin blog.csdn.net/A_awen/article/details/122667260