[ https://issues.apache.org/jira/browse/NETBEANS-5598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17325865#comment-17325865 ]
Jaroslav Tulach commented on NETBEANS-5598: ------------------------------------------- It would be great to have a .travis build testing on JDK16 - looks like the 16th JDK is significantly different to previous ones and many unit tests are likely to fail. > IllegalAccessException on running Netbeans Platform Application in JDK 16 > ------------------------------------------------------------------------- > > Key: NETBEANS-5598 > URL: https://issues.apache.org/jira/browse/NETBEANS-5598 > Project: NetBeans > Issue Type: Bug > Affects Versions: 12.3, 12.4 > Reporter: Sandeep Mishra > Priority: Major > > Create or Open an existing Netbeans Platform Application. > Run the application with Java Platform set to JDK 16. > The following exception occurs: > {code:java} > java.lang.IllegalAccessException: class org.netbeans.Module cannot access a > member of class java.lang.ClassLoader (in module java.base) with modifiers > "protected" > at > java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:385) > at > java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:687) > at java.base/java.lang.reflect.Method.invoke(Method.java:559) [catch] at > org.netbeans.Module.findResources(Module.java:571) at > org.netbeans.core.startup.NbInstaller.loadLayers(NbInstaller.java:605) at > org.netbeans.core.startup.NbInstaller.loadImpl(NbInstaller.java:332) at > org.netbeans.core.startup.NbInstaller.access$000(NbInstaller.java:77) at > org.netbeans.core.startup.NbInstaller$1.run(NbInstaller.java:322) at > org.openide.filesystems.FileUtil$2.run(FileUtil.java:413) at > org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:102) > at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:494) at > org.openide.filesystems.FileUtil.runAtomicAction(FileUtil.java:397) at > org.openide.filesystems.FileUtil.runAtomicAction(FileUtil.java:417) at > org.netbeans.core.startup.NbInstaller.load(NbInstaller.java:319) at > org.netbeans.ModuleManager.enable(ModuleManager.java:1453) at > org.netbeans.ModuleManager.enable(ModuleManager.java:1254) at > org.netbeans.core.startup.ModuleList.installNew(ModuleList.java:315) at > org.netbeans.core.startup.ModuleList.trigger(ModuleList.java:251) at > org.netbeans.core.startup.ModuleSystem.restore(ModuleSystem.java:298) at > org.netbeans.core.startup.Main.getModuleSystem(Main.java:156) at > org.netbeans.core.startup.Main.getModuleSystem(Main.java:125) at > org.netbeans.core.startup.Main.start(Main.java:282) at > org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:98) at > java.base/java.lang.Thread.run(Thread.java:831) {code} > This is happening because access to JDK Internals has been disallowed from > JDK 16 onwards. > https://openjdk.java.net/jeps/396 > It used to show a warning in earlier JDK versions. > There are few other places where the Netbeans Platform is hacking into JDK > internals: > > {code:java} > WARNING: Illegal reflective access by > org.netbeans.modules.debugger.ui.views.debugging.DebugTreeView > > (jar:file:/Users/albatem/netbeans-12.3/ide/modules/org-netbeans-spi-debugger-ui.jar!/) > > to field javax.swing.tree.FixedHeightLayoutCache.info > at > > org.netbeans.modules.debugger.ui.views.debugging.DebugTreeView.clearSelectionCache(DebugTreeView.java:150) > at > > org.netbeans.modules.debugger.ui.views.debugging.DebugTreeView.resetSelection(DebugTreeView.java:140) > at > > org.netbeans.modules.debugger.ui.views.debugging.DebuggingViewComponent.releaseTreeView(DebuggingViewComponent.java:661) > at > > org.netbeans.modules.debugger.ui.views.debugging.DebuggingViewComponent.access$600(DebuggingViewComponent.java:104) > at > > org.netbeans.modules.debugger.ui.views.debugging.DebuggingViewComponent$4.run(DebuggingViewComponent.java:423) > > WARNING: Illegal reflective access by org.openide.text.QuietEditorPane$1 > > (jar:file:/Users/albatem/netbeans-12.3/platform/modules/org-openide-text.jar!/) > > to field sun.awt.im.InputContext.inputMethodWindowContext > at org.openide.text.QuietEditorPane$1.run(QuietEditorPane.java:268) > at > org.openide.text.QuietEditorPane.removeNotify(QuietEditorPane.java:308) > > > WARNING: Illegal reflective access by > org.netbeans.modules.debugger.ui.views.debugging.DebugTreeView > > (jar:file:/Users/albatem/netbeans-12.3/ide/modules/org-netbeans-spi-debugger-ui.jar!/) > > to field javax.swing.tree.FixedHeightLayoutCache.info > at > > org.netbeans.modules.debugger.ui.views.debugging.DebugTreeView.clearSelectionCache(DebugTreeView.java:150) > at > > org.netbeans.modules.debugger.ui.views.debugging.DebugTreeView.resetSelection(DebugTreeView.java:140) > at > > org.netbeans.modules.debugger.ui.views.debugging.DebuggingViewComponent.releaseTreeView(DebuggingViewComponent.java:661) > at > > org.netbeans.modules.debugger.ui.views.debugging.DebuggingViewComponent.access$600(DebuggingViewComponent.java:104) > at > > org.netbeans.modules.debugger.ui.views.debugging.DebuggingViewComponent$4.run(DebuggingViewComponent.java:423) > WARNING: Illegal reflective access by > org.netbeans.core.output2.FileMapStorage > > (jar:file:/Users/albatem/netbeans-12.3/platform/modules/org-netbeans-core-output2.jar!/) > > to method java.nio.DirectByteBuffer.cleaner() > at > org.netbeans.core.output2.FileMapStorage.unmap(FileMapStorage.java:311) > at > org.netbeans.core.output2.FileMapStorage.access$400(FileMapStorage.java:38) > at > > org.netbeans.core.output2.FileMapStorage$MappedBufferResource.decRefs(FileMapStorage.java:479) > at > > org.netbeans.core.output2.FileMapStorage.updateContents(FileMapStorage.java:377) > at > > org.netbeans.core.output2.FileMapStorage.getReadBuffer(FileMapStorage.java:341) > at > org.netbeans.core.output2.AbstractLines.getText(AbstractLines.java:125) > at > org.netbeans.core.output2.OutputDocument.getText(OutputDocument.java:195) > > {code} > -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists