jdk下载网址: https://www.oracle.com/java/technologies/downloads/#java8-windows.
具体安装过程不再赘述,只记录环境变量设置方式。
安装成功后新建系统变量:
JAVA_HOME = D:\software\Java\jdk1.8.0_231
CLASSPATH = %JAVA_HOME%\lib
Path = %JAVA_HOME%\bin
Path = %JAVA_HOME%\jre\bin
确定后重启命令窗口分别输入java、javac、java -version进行测试