英文:
How to fix `java: Cannot run program "..." (in directory "..."): error=0 Failed to exec spawn helper: pid: xxxx, signal: xx` issue
问题
我使用JetBrains客户端远程开发运行了我的Java应用程序,正如你所见,我遇到了一个问题:java: Cannot run program "... "(在目录"... "中):error=0 Failed to exec spawn helper: pid: xxx,signal: 11
,这在对话框中提示,你能帮我解决这个问题,以成功运行我的Java应用程序吗?
英文:
I ran my Java application using JetBrains Client remote development, as you see, I have encountered an issue with java: Cannot run program "..." (in directory "..."): error=0 Failed to exec spawn helper: pid: xxx, signal: 11
prompt in dialog, and how to fix it.
Could you help me and fix the issue to run my Java application successfully?
答案1
得分: 1
这似乎是本地机器上JDK发行版的问题。请检查运行构建过程的JDK是否在jre/lib子目录中具有一个名为“jspawnhelper”的可执行文件。 "jspawnhelper" 应具有适当的执行权限。通常,IDE在项目关联的最新JDK上运行构建过程。重要的是检查启动程序的JDK,而不是正在启动的程序(在我们的情况下,这是一个不同的VM可执行文件)。
或者,您可以尝试通过在文件 | 设置 | 构建、执行、部署 | 编译器 | *构建过程VM选项文本字段中添加标志来配置JDK以使用较旧的启动机制:
-Djdk.lang.Process.launchMechanism=vfork
请告诉我这是否有帮助。
英文:
This looks like a problem of a JDK distro on the local machine. Please check that the JDK, the build process runs on, has an executable named "jspawnhelper" in a jre/lib subdirectory. The "jspawnhelper" should have proper executing permissions. To run build process IDE usually uses the most recent JDK associated with the project. It is important to check the JDK that launches a program and not a program being launched (in our case this is a different VM executable)
Alternatively, you may try to configure JDK to use older launching mechanism by adding flag to File | Settings | Build, Execution, Deployment | Compiler | * build process VM options text field
-Djdk.lang.Process.launchMechanism=vfork
Please let me know if this helps.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论