John
John

Reputation: 11

How to fix `java: Cannot run program "..." (in directory "..."): error=0 Failed to exec spawn helper: pid: xxxx, signal: xx` issue

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.

enter image description here

Could you help me and fix the issue to run my Java application successfully?

Upvotes: 1

Views: 8851

Answers (2)

kmarton2000
kmarton2000

Reputation: 1

I had the same problem on jenkins in ubuntu. It had java jdk 17 version on it, I simply upgraded (sudo apt install openjdk-21-jdk) java version to java jdk 21, and the problem is solved

Upvotes: 0

Jacky Liu
Jacky Liu

Reputation: 528

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.

Upvotes: 2

Related Questions