除了文件自身权限问题之外,还需要对JDK的lib目录下的jspawnhelper进行赋予执行权限,否则也会报错。
I had a similar problem and the solution was to chmod +x lib/jspawnhelper in the JRE folder.Share Improve this answer Follow answered Nov 13, 2023 at 11:17 Edi's user avatar Edi 23633 silver badges33 bronze badges Thanks for posting this Edi. After upgrading from Java 11 to Java 17, we started getting these sorts of Permission denied exceptions on basic Linux commands called from our Java based installer. Your suggestion of chmod +x $JRE_HOME/lib/jspawnhelper fixed the issue for us. – LanceCommentedNov 15, 2023 at 10:53