eclipse 执行失败:java.io.IOException:无法运行程序“jarsigner.exe”:CreateProcess
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11593875/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Execute failed: java.io.IOException: Cannot run program "jarsigner.exe": CreateProcess
提问by Amira Manai
I'm trying to run a buildXXX.xml file using ANT but i'm getting this error:
我正在尝试使用 ANT 运行 buildXXX.xml 文件,但出现此错误:
Buildfile: C:\Users\Amira\Desktop\SaloméTMF\Salome TMF
V3.1SourceCode\buildSOAPClient.xml
init:
prepare:
compile:
makesoapjar:
makeihmjar:
makecorejar:
makedatajar:
makeapijar:
makeloginjar:
maketoolsjar:
makeplugintoolsjar:
makeUpdatejar:
makebootjar:
makecodexjar:
makejar:
signjar:
[signjar] Signing JAR: C:\Users\Amira\Desktop\SaloméTMF\Salome TMF
V3.1SourceCode\distrib\salome_tmf-soap-client\activation.jar to
C:\Users\Amira\Desktop\SaloméTMF\Salome TMF V3.1SourceCode\distrib\salome_tmf-soap-
client\activation.jar as salome_tmf
BUILD FAILED
C:\Users\Amira\Desktop\SaloméTMF\Salome TMF V3.1SourceCode\buildSOAPClient.xml:251:
Execute failed: java.io.IOException: Cannot run program "jarsigner.exe": CreateProcess
error=2, Le fichier spécifié est introuvable
Total time: 5 seconds
I made a search so i found that i should use JDK instead of JRE so i change it but the same error persist.
我进行了搜索,所以我发现我应该使用 JDK 而不是 JRE,所以我更改了它,但同样的错误仍然存在。
Any idea will be appreciated cheers
任何想法将不胜感激欢呼
回答by Amira Manai
The solution is to use JDK as installed JRE in eclipse , and to set the JAVA-HOME variable to JDK path. Hope this help others :))
解决方案是在eclipse中使用JDK作为安装的JRE,并将JAVA-HOME变量设置为JDK路径。希望这对其他人有帮助:))
回答by PeterVermont
My solution was to change from 'Run in the same JRE as the workspace' to 'Separate JRE' which is weird because these are the same JRE.
我的解决方案是从“在与工作区相同的 JRE 中运行”更改为“单独的 JRE” ,这很奇怪,因为它们是相同的 JRE。
Strange!
奇怪的!
回答by Chopper
I also selected 'Separate JRE' this allowed me to select the JDK rather than the JRE and that presumably enabled ANT to find the jarsigner in the JDK bin directory
我还选择了“单独的 JRE”,这让我可以选择 JDK 而不是 JRE,并且大概可以让 ANT 在 JDK bin 目录中找到 jarsigner