java-decompiler / jd-gui

A standalone Java Decompiler GUI
GNU General Public License v3.0
13.97k stars 2.38k forks source link

mac m1 无法识别JDK #427

Open GithubGey opened 1 year ago

GithubGey commented 1 year ago

mac m1 无法识别JDK,

image

需要收到修改一下内容,才可以启动

image
softsheng commented 1 year ago

我也遇到了同样的问题,请问如何解决了?

bobolau commented 10 months ago

modify file JD-GUI/Contents/MacOS/universalJavaApplicationStub.sh line 230, add remove +, so 1.8+ change to 1.8

# check for specified JVMversion in "/usr/libexec/java_home" symlinks
elif [ ! -z ${JVMVersion} ] && [ -x /usr/libexec/java_home ] && /usr/libexec/java_home -F; then
       # Remove the + sign from JVMVersion
       JVMVersion="${JVMVersion%+}"

source file src/osx/resources/universalJavaApplicationStub.sh

lj3lj3 commented 5 months ago

也可以直接下载jar包执行

Louis0704 commented 2 months ago

modify file JD-GUI/Contents/MacOS/universalJavaApplicationStub.sh line 230, add remove +, so 1.8+ change to 1.8

# check for specified JVMversion in "/usr/libexec/java_home" symlinks
elif [ ! -z ${JVMVersion} ] && [ -x /usr/libexec/java_home ] && /usr/libexec/java_home -F; then
       # Remove the + sign from JVMVersion
       JVMVersion="${JVMVersion%+}"

source file src/osx/resources/universalJavaApplicationStub.sh

Thanks! It works.

happut commented 1 month ago

修改 /Applications/JD-GUI.app/Contents/Info.plist 里面的

<key>JVMVersion</key>
<string>1.8</string>

1.8+改为1.8

image