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 sun.awt.im.InputContext accessible: module java.desktop does not export sun.awt.im to unnamed module @4a00808f
Summary: reflect.InaccessibleObjectException: Unable to make member of class sun.awt.i...
Status: REOPENED
Alias: None
Product: platform
Classification: Unclassified
Component: Launchers&CLI (show other bugs)
Version: 8.2
Hardware: All All
: P2 normal (vote)
Assignee: Libor Fischmeistr
URL:
Keywords: JDK_9
Depends on:
Blocks:
 
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


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

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




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

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: http://wiki.netbeans.org/JDK9Support#Linux
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/sun.awt.im=ALL-UNNAMED -J-XaddExports:java.desktop/com.sun.java.swing.plaf.gtk=ALL-UNNAMED -J-XaddExports:java.management/sun.management=ALL-UNNAMED

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.