Java开发环境的配置 2017-08-04 每次重装系统后,我都是先配置Java环境,但是按照网上的步骤总是在运行javac命令行时失败,后来发现是path的问题,下面是完整的配置的步骤。 1.首先来到oracle官网http://www.oracle.com/technetwork/java/javase/downloads/index.html 点击这里:[ ](http://www.wjgbaby.com/wp-content/uploads/2017/08/17080438-300x174.png)](http://www.wjgbaby.com/wp-content/uploads/2017/08/17080438.png) 2.勾选Accept按钮,然后下载32位或者64位jdk:[![](http://www.wjgbaby.com/wp-content/uploads/2017/08/17080439-294x300.png)](http://www.wjgbaby.com/wp-content/uploads/2017/08/17080439.png) 3.建议安装之前,现在D盘新建个名叫Java的文件夹,再建一个jdk子文件夹和一个jre子文件夹,一会要用到[![](http://www.wjgbaby.com/wp-content/uploads/2017/08/17080440-300x47.png)](http://www.wjgbaby.com/wp-content/uploads/2017/08/17080440.png)4.打开下载好的exe文件开始安装,安装过程中,把jdk的路径放到我们刚才新建的jdk文件夹中[![](http://www.wjgbaby.com/wp-content/uploads/2017/08/17080441-300x224.png)](http://www.wjgbaby.com/wp-content/uploads/2017/08/17080441.png) 5.把jre的路径也放到刚才新建的jre文件夹[![](http://www.wjgbaby.com/wp-content/uploads/2017/08/17080442-300x225.png)](http://www.wjgbaby.com/wp-content/uploads/2017/08/17080442.png)6.安装完成后,进入电脑属性面板,点击高级系统设置[![](http://www.wjgbaby.com/wp-content/uploads/2017/08/17080443-300x174.png)](http://www.wjgbaby.com/wp-content/uploads/2017/08/17080443.png)7.点击环境变量[![](http://www.wjgbaby.com/wp-content/uploads/2017/08/17080450-266x300.png)](http://www.wjgbaby.com/wp-content/uploads/2017/08/17080450.png)8.点击新建[![](http://www.wjgbaby.com/wp-content/uploads/2017/08/17080444-300x288.png)](http://www.wjgbaby.com/wp-content/uploads/2017/08/17080444.png)9.输入变量名:JAVA_HOME 变量值:D:\Java\jdk 点击确定[![](http://www.wjgbaby.com/wp-content/uploads/2017/08/17080445-300x72.png)](http://www.wjgbaby.com/wp-content/uploads/2017/08/17080445.png)10.再次点击新建 输入变量名:CLASSPATH 变量值:.;%JAVA_HOME%\lib 注意符号,点击确定[![](http://www.wjgbaby.com/wp-content/uploads/2017/08/17080446-300x72.png)](http://www.wjgbaby.com/wp-content/uploads/2017/08/17080446.png) 11.双击Path,点击新建,在最后一行加入:D:\Java\jdk\bin 完成后点击确定 [![](http://www.wjgbaby.com/wp-content/uploads/2017/08/17080447-300x229.png)](http://www.wjgbaby.com/wp-content/uploads/2017/08/17080447.png)12.按windows+R键,输入cmd,依次在命令行输入java和javac,如果如下图所示,则说明配置完成。[![](http://www.wjgbaby.com/wp-content/uploads/2017/08/17080448-300x160.png)](http://www.wjgbaby.com/wp-content/uploads/2017/08/17080448.png)[![](http://www.wjgbaby.com/wp-content/uploads/2017/08/17080449-300x164.png) Last updated: 2020-07-05 16:56:50 Prev Autodesk软件激活问题 Next Unity操作XML