gpt4 book ai didi

linux - java运行jar文件失败不退出回提示

转载 作者:太空宇宙 更新时间:2023-11-04 09:55:07 25 4
gpt4 key购买 nike

运行时java -jar myfile.jar在我的 RHEL 64 机器上,如果由于某种原因安装失败,我不会返回提示 - 因此进程不会退出

在其他 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

但是没有提示,进程还在运行...

最佳答案

可能是您仍然保留着一些非守护线程?尝试获取 Java 堆栈转储:

kill -QUIT <process_id>

关于linux - java运行jar文件失败不退出回提示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6057308/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com