【发布时间】:2011-05-19 10:34:59
【问题描述】:
在我的 RHEL 64 机器上运行 java -jar myfile.jar 时,如果由于某种原因安装失败,我不会返回提示 - 因此进程不会退出
在其他 RHEL 64 机器上,运行相同的 jar 文件时,如果失败,我会返回提示。
两台机器都运行相同版本的 java 1.6.0_25
有人知道什么会导致这种行为吗?
编辑:jar 有一个一开始就失败的 ant build xml(我添加了<fail/> 任务)。
运行文件时我得到了这个
Total time: 1 second
validate failed
org.tp23.antinstaller.InstallException: Error running the install, Ant run failed - examine the error logs for details
at org.tp23.antinstaller.runtime.exe.AntLauncherFilter.exec(AntLauncherFilter.java:112)
at org.tp23.antinstaller.runtime.exe.AntLauncherValidateFilter.exec(AntLauncherValidateFilter.java:53)
at org.tp23.antinstaller.runtime.ExecInstall.exec(ExecInstall.java:89)
at org.tp23.antinstaller.selfextract.SelfExtractor.main(SelfExtractor.java:372)
Install failed
Error running the install, Ant run failed - examine the error logs for details
Failed
但没有提示,进程仍在运行...
【问题讨论】:
-
您确定安装失败了吗?你怎么知道的?您是否在某些文件上记录了一些错误?
-
MarcoS:我知道它失败了,因为我写了它,并且我明确告诉它不能尝试理解它为什么不退出。此外,在不同的机器上运行相同的文件确实会退出程序,因此它必须是与环境相关的问题