我的电脑是Windows 8.1,x64。我从oracle的网站下载jdk 1.8.5_20。当我设置环境变量时,我打开cmd,输入" javac" ,它无法奏效!但是" java"很成功......
我查看了我的环境变量It's。
所以我输入" echo%java_home%"在cmd中,我发现字符串之前有一个空格。
我认为这必须是错误的!
但我无法解决它!
我尝试任何方式,比如打字。但是没有得到好结果!
答案 0 :(得分:0)
打开JDK的默认安装路径
C:\Program Files\Java
转到以下目录
C:\Program Files\Java\jdk1.6.0_10
设置 JAVA_HOME 变量
Right-click the My Computer icon on, your desktop and select Properties.
Click the Advanced tab. Click the
`Environment Variables` button. Under System Variables, click New.
Enter the variable name as **JAVA_HOME**.
Enter the variable value as the installation path for the Java Development Kit.
Click OK and Apply Changes.
答案 1 :(得分:0)