'keytool' is not recognized as an internal or external command解决方案

Java命令无法找到,原因比较负责涉及到环境变量的设置和冲突等等。
当我们在运行命令:
C:\>keytool -genkey -keystore test.store -alias test -validity 31

时,出现了这个错误:
[b]'keytool' is not recognized as an internal or external command,operable program or batch file.[/b]

具体的解决方案也很简单,请给keytool命令加上路径:
例如:
D:\Java\jdk1.6.0_26\bin\keytool -genkey -keystore test.store -alias test -validity 31
展开阅读全文

Maven错误“'cmd' is not recognized as an internal or external command

11-22

上星期使用maven的时候还是一切正常。过了个周末,今天早上再用,却总是出现错误“'cmd' is not recognized as an internal or external command,”。不论是build project,还是用“mvn -v”显示maven 的版本。都能看到这个错误提示。rnrn但是,如果直接在run里面输入"cmd"命令,可以打开windows console。而且,maven的错误提示貌似并不影响maven的正常工作。Maven还是成功的生成了ear文件,也可以成功的显示版本号,结果如下。rnrnBuild 的部分结果: rn [exec] [INFO] BUILD SUCCESSFULrn [exec] [INFO] ------------------------------------------------------------------------rn [exec] [INFO] Total time: 46 secondsrn [exec] [INFO] Finished at: Mon Nov 22 11:39:17 CET 2010rn [exec] [INFO] Final Memory: 76M/247Mrn [exec] [INFO] ------------------------------------------------------------------------rn [exec] 'cmd' is not recognized as an internal or external command,rn [exec] operable program or batch file.rnrnBUILD FAILEDrnD:\Documents and Settings\xuega\workspace_eras\ERAS\build.xml:22: exec returned: 1rnrnTotal time: 47 secondsrnrn显示版本号的结果:rnrnC:\>mvn -vrnApache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)rnJava version: 1.6.0_20rnJava home: C:\Program Files\Java\jdk1.6.0_20\jrernDefault locale: nl_BE, platform encoding: Cp1252rnOS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"rn'cmd' is not recognized as an internal or external command,rnoperable program or batch file.rnrnrn虽然这么说,看到一个错误提示总是不爽。请各位高手帮帮忙,解决这个问题。不慎感谢!rn 论坛

没有更多推荐了,返回首页