Problem
When using JetBrains Client remote development to run the Java program, then encountered an issue with java: Cannot run program "..." (in directory "..."): error=0 Failed to exec spawn helper: pid: xxx, signal: 11 prompts in the dialog, how to fix it?
Detailed error message:
java: Cannot run program "/home/<redacted>/.jdks/corretto-1.8.0_352/bin/java"
(in directory "/local/home/<redacted>/.cache/JetBrains/RemoteDev-IU/<redacted>/compile-server"):
error=0, Failed to exec spawn helper: pid: 31592, exit value: 1
The same issue happens with other 1.8 JDKs I tried, but it works with Corretto-11 (though the app does not support JDK11).
Resolution
This looks like a problem with a JDK distro on the local machine. Please check that the JDK, the build process runs on, has an executable named "jspawnhelper" in the jre/lib subdirectory. The "jspawnhelper" should have proper executing permissions. To run the build process, IDE usually uses the most recent JDK associated with the project. It is essential 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 an older launching mechanism by adding a flag to File | Settings | Build, Execution, Deployment | Compiler | * build process VM options text field
-Djdk.lang.Process.launchMechanism=vfork
Ref: https://stackoverflow.com/a/61325264/20979453
Cannot run program java, failed to exec spawn helper, exit value: 1
Comments
0 comments
Please sign in to leave a comment.