JD-GUI failed to start on mojave

笔者安装了JDK11, JD-GUI会闪退。

➜  java --version
java 11.0.2 2019-01-15 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.2+9-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.2+9-LTS, mixed mode)

网络说要用1.7以下。

暂时的solution, 可在以下file -universalJavaApplicationStub.sh 中添加以下两行:

--add-opens java.base/jdk.internal.loader=ALL-UNNAMED \
--add-opens jdk.zipfs/jdk.nio.zipfs=ALL-UNNAMED \
            
/Applications/JD-GUI.app/Contents/MacOS/universalJavaApplicationStub.sh
    ...
    	exec "$JAVACMD" \
			-cp "${JVMClassPath}" \
			-Xdock:icon="${ResourcesFolder}/${CFBundleIconFile}" \
			-Xdock:name="${CFBundleName}" \
			--add-opens java.base/jdk.internal.loader=ALL-UNNAMED \
			--add-opens jdk.zipfs/jdk.nio.zipfs=ALL-UNNAMED \
			${JVMOptions:+$JVMOptions }\
			${JVMDefaultOptions:+$JVMDefaultOptions }\
			${JVMMainClass}\
			${JVMArguments:+ $JVMArguments}
    ...

Ref

JD-GUI crash on start up w/ Mac High Sierra? · Issue #196 · java-decompiler/jd-gui

Show Comments