jd-gui不能在jdk9上使用

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/fjh658/article/details/78132803

JDK9上报错类似

Exception in thread "main" java.lang.reflect.InaccessibleObjectException: Unable to make jdk.internal.loader.ClassLoaders$AppClassLoader(jdk.internal.loader.ClassLoaders$PlatformClassLoader,jdk.internal.loader.URLClassPath) accessible: module java.base does not "opens jdk.internal.loader" to unnamed module @2a17b7b6

https://github.com/java-decompiler/jd-gui/issues/187

JDK9 add new feature “module”, access restricted class of some module.

modify Info.plist
image
image

VMOptions=-Xms512m --add-opens java.base/jdk.internal.loader=ALL-UNNAMED --add-opens jdk.zipfs/jdk.nio.zipfs=ALL-UNNAMED

or

workaround

macOS
java --add-opens java.base/jdk.internal.loader=ALL-UNNAMED --add-opens jdk.zipfs/jdk.nio.zipfs=ALL-UNNAMED -jar /Applications/JD.app/Contents/Resources/Java/jd-gui-1.4.0.jar

win/linux
java --add-opens java.base/jdk.internal.loader=ALL-UNNAMED --add-opens jdk.zipfs/jdk.nio.zipfs=ALL-UNNAMED -jar jd-gui-1.4.0.jar
展开阅读全文

没有更多推荐了,返回首页