jdk环境变量设置后不生效,javac提示“不是内部或外部命令,也不是可运行的程序 文件。”
cmd下set的结果:ALLUSERSPROFILE=C:\ProgramDataAPPDATA=C:\Users\sony\AppData\RoamingCLASSPA...
cmd下set的结果:
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\sony\AppData\Roaming
CLASSPATH=.;C:\Program Files\Java\jdk1.7.0_21\lib;C:\Program Files\Java\jdk1.7.0_21\lib\tools.jar
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=SONY-VAIO
ComSpec=C:\Windows\system32\cmd.exe
configsetroot=C:\Windows\ConfigSetRoot
EMC_AUTOPLAY=C:\Program Files (x86)\Common Files\Roxio Shared\
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Users\sony
JAVA_HOME=C:\Program Files\Java\jdk1.7.0_21
LOCALAPPDATA=C:\Users\sony\AppData\Local
LOGONSERVER=\\SONY-VAIO
NUMBER_OF_PROCESSORS=4
OS=Windows_NT
Path=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\Java\jdk1.7.0_21\lib;C:\Program Files\Java\jdk1.7.0_21\lib\tools.jar;C:\Users\sony\Documents\DBank\ClickUp
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 37 Stepping 2, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=2502
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files 展开
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\sony\AppData\Roaming
CLASSPATH=.;C:\Program Files\Java\jdk1.7.0_21\lib;C:\Program Files\Java\jdk1.7.0_21\lib\tools.jar
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=SONY-VAIO
ComSpec=C:\Windows\system32\cmd.exe
configsetroot=C:\Windows\ConfigSetRoot
EMC_AUTOPLAY=C:\Program Files (x86)\Common Files\Roxio Shared\
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Users\sony
JAVA_HOME=C:\Program Files\Java\jdk1.7.0_21
LOCALAPPDATA=C:\Users\sony\AppData\Local
LOGONSERVER=\\SONY-VAIO
NUMBER_OF_PROCESSORS=4
OS=Windows_NT
Path=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\Java\jdk1.7.0_21\lib;C:\Program Files\Java\jdk1.7.0_21\lib\tools.jar;C:\Users\sony\Documents\DBank\ClickUp
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 37 Stepping 2, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=2502
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files 展开
3个回答
展开全部
你的配置错误比较多,不光是path路径错误,classpath也不恰当。
正确的配置是在系统变量里面配置:
JAVA_HOME
C:\Program Files\Java\jdk1.7.0_21
Path
%JAVA_HOME%\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;
CLASSPATH
.;%JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\jre\lib\rt.jar;
正确的配置是在系统变量里面配置:
JAVA_HOME
C:\Program Files\Java\jdk1.7.0_21
Path
%JAVA_HOME%\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;
CLASSPATH
.;%JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\jre\lib\rt.jar;
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询