标签:JAVA 变量值 环境 HOME% 变量名 安装 环境变量
1.工具下载
下载JDK:https://www.oracle.com/java/technologies/downloads/#jdk18-windows
![](/i/l/?n=22&i=blog/2363440/202208/2363440-20220817114107445-1548264755.png)
下载完成后点击安装 一直“下一步”即可(其中可选择安装路径)
![](/i/l/?n=22&i=blog/2363440/202208/2363440-20220817114310950-872896720.png)
IntelliJ IDEA:https://www.jetbrains.com.cn/idea/download/#section=windows
![](/i/l/?n=22&i=blog/2363440/202208/2363440-20220817115247216-990663402.png)
2.环境变量配置
打开控制面板
![](/i/l/?n=22&i=blog/2363440/202208/2363440-20220817114504483-400571071.png)
选择系统属性中高级下的环境变量
![](/i/l/?n=22&i=blog/2363440/202208/2363440-20220817114539214-2056330572.png)
在系统变量中配置JAVA环境变量
![](/i/l/?n=22&i=blog/2363440/202208/2363440-20220817114607057-104273584.png)
变量名:JAVA_HOME
变量值:D:\JAVAJDK // 要根据自己的实际路径配置
![](/i/l/?n=22&i=blog/2363440/202208/2363440-20220817114722631-1206175766.png)
变量名:CLASSPATH
变量值:.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar //记得前面有个"."
![](/i/l/?n=22&i=blog/2363440/202208/2363440-20220817114744814-656397514.png)
变量名:Path
变量值:%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin
![](/i/l/?n=22&i=blog/2363440/202208/2363440-20220817114757389-1403175050.png)
配置完成后 cmd输入“java -version”出现一下信息则安装成功
![](/i/l/?n=22&i=blog/2363440/202208/2363440-20220817114841435-409522355.png)
标签:JAVA,
变量值,
环境,
HOME%,
变量名,
安装,
环境变量
From: https://www.cnblogs.com/Stars0121/p/16594565.html