This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 258952 - reflect.InaccessibleObjectException: Unable to make member of class accessible: module java.desktop does not export to unnamed module @4a00808f
Summary: reflect.InaccessibleObjectException: Unable to make member of class sun.awt.i...
Alias: None
Product: platform
Classification: Unclassified
Component: Launchers&CLI (show other bugs)
Version: 8.2
Hardware: All All
: P2 normal (vote)
Assignee: Libor Fischmeistr
Keywords: JDK_9
Depends on:
Reported: 2016-04-21 13:30 UTC by Jiri Prox
Modified: 2016-06-17 18:29 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 223671

stacktrace (7.42 KB, text/plain)
2016-04-21 13:30 UTC, Jiri Prox
stacktrace (5.42 KB, text/plain)
2016-04-21 13:32 UTC, Jiri Prox

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Prox 2016-04-21 13:30:15 UTC
Build: NetBeans IDE Dev (Build 201604200001)
VM: Java HotSpot(TM) 64-Bit Server VM, 9-ea+114, Java(TM) SE Runtime Environment, 9-ea+114
OS: Mac OS X

User Comments:
jiriprox: Launching AnagramGame on JDK9

java.lang.reflect.InaccessibleObjectException: Unable to make member of class accessible:  module java.desktop does not export to unnamed module @4a00808f
   at sun.reflect.Reflection.throwInaccessibleObjectException(
   at java.lang.reflect.AccessibleObject.checkCanSetAccessible(
   at java.lang.reflect.Field.checkCanSetAccessible(
   at java.lang.reflect.Field.setAccessible(
   at org.openide.text.QuietEditorPane$
   at org.openide.text.QuietEditorPane.removeNotify(
Comment 1 Jiri Prox 2016-04-21 13:30:17 UTC
Created attachment 159377 [details]
Comment 2 Jiri Prox 2016-04-21 13:32:58 UTC
Created attachment 159378 [details]

Opening GUI designer
Comment 3 Jiri Prox 2016-04-21 13:42:26 UTC
This is thrown in many cases: for example opening output window, browsing project structure ....
Comment 4 Martin Balin 2016-04-24 19:59:30 UTC
There seems to be a difference when using dev build of JDK9 supp (with addExports in launchers) on top of JDK9 vs running own build with command line switches as specified here:
Testing with ClientEditor sample.

Using JDK9 build 201604210404 from download page - various exceptions about unexported packages to NB modules.

Running JDK9 build built from sources with command line switches like ./netbeans --jdkhome /home/mb/jdk9-ea-b113 -J-XaddExports:java.desktop/sun.awt=ALL-UNNAMED -J-XaddExports:java.base/jdk.internal.jrtfs=ALL-UNNAMED -J-XaddExports:java.desktop/java.awt.peer=ALL-UNNAMED -J-XaddExports:java.desktop/com.sun.beans.editors=ALL-UNNAMED -J-XaddExports:java.desktop/ -J-XaddExports:java.desktop/

No illegal access issue at all.

Looks like problem is with launcher and passing addExports to JVM.
Comment 5 Libor Fischmeistr 2016-04-25 15:58:11 UTC
Works with newer JDK 9 build b114. Closing
Comment 6 Libor Fischmeistr 2016-04-25 16:05:54 UTC
Sorry, wrong issue.