打开 IDEA ,点击 Remote Development -> WSL ,然后依次选择 IDE 版本和项目目录。打开之后编写代码并点击运行,运行失败报错:
java: Cannot run program "/usr/lib/jvm/jdk8u352/bin/java" (in directory "/home/XXXX/.cache/JetBrains/RemoteDev-IU/_home_XXXX_Projects_demo/compile-server"): error=0, Failed to exec spawn helper: pid: 2483, exit value: 1
有人遇到相似的错误吗?
|      1house600      2023-01-10 14:52:44 +08:00 我也遇到了,有解吗 | 
|      2selfi OP | 
|      3house600      2023-01-11 09:48:26 +08:00 @Richardhtw 我也看到了,加上了 JVM 参数还是不行 | 
|  |      4Dxxxxs      2023-02-11 23:26:58 +08:00 @house600 按照最下面那哥们的方法试了一下 解决了。 I have the same issue using Windows 10 as my local machine and a Linux remote server. Locally I have Gateway 2022.3.1 installed and on the remote I've tried with both 2022.3.1 and the 2022.3.2 Preview (Build #JBC-223.8617.20). Previous local and remote versions have not had this issue. I was able to fix it by adding -Djdk.lang.Process.launchMechanism=vfork to the "Shared build process VM options" setting under Build, Execution, Deployment > Compiler. |