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 262765 - IllegalAccessException module java.desktop does not export sun.awt to unnamed module
Summary: IllegalAccessException module java.desktop does not export sun.awt to unnamed...
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: Launchers&CLI (show other bugs)
Version: 8.2
Hardware: PC Linux
: P2 normal (vote)
Assignee: Libor Fischmeistr
Keywords: JDK_9
Depends on:
Reported: 2016-07-11 11:14 UTC by Martin Balin
Modified: 2017-10-05 08:12 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Martin Balin 2016-07-11 11:14:15 UTC
JDK9 branch build 20160711 on top of JDK9 EA b 126.
Installed NB JDK9 using installer on top of JDK 9 EA b126 as runtime platform. Starting NB9 throws following exception:
java.lang.IllegalAccessException: class org.netbeans.TopSecurityManager cannot access class sun.awt.AppContext (in module java.desktop) because module java.desktop does not export sun.awt to unnamed module @35fc6dc4
	at jdk.internal.reflect.Reflection.throwIllegalAccessException(java.base@9-ea/
	at jdk.internal.reflect.Reflection.throwIllegalAccessException(java.base@9-ea/
	at jdk.internal.reflect.Reflection.ensureMemberAccess(java.base@9-ea/
	at java.lang.reflect.AccessibleObject.slowCheckMemberAccess(java.base@9-ea/
	at java.lang.reflect.AccessibleObject.checkAccess(java.base@9-ea/
	at java.lang.reflect.Method.invoke(java.base@9-ea/
	at org.netbeans.TopSecurityManager.makeSwingUseSpecialClipboard(
	at org.netbeans.core.startup.Main.start(

Run NB9 as "./netbeans -J-XaddExports:java.desktop/sun.awt=ALL-UNNAMED" and this exc. goes away.
Seems like a problem that this export is missing in NB9 launcher...

In addition to this export we have a report on MacOSX that " module java.desktop does not export to unnamed module "
Full list of exports is at
Please check
Comment 1 webigrator 2017-10-05 08:12:50 UTC
This is occurring on Mac OS Sierra 10.12.6