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
URL:
Keywords: JDK_9
Depends on:
Blocks:
 
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:


Attachments

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/Reflection.java:405)
	at jdk.internal.reflect.Reflection.throwIllegalAccessException(java.base@9-ea/Reflection.java:396)
	at jdk.internal.reflect.Reflection.ensureMemberAccess(java.base@9-ea/Reflection.java:98)
	at java.lang.reflect.AccessibleObject.slowCheckMemberAccess(java.base@9-ea/AccessibleObject.java:355)
	at java.lang.reflect.AccessibleObject.checkAccess(java.base@9-ea/AccessibleObject.java:347)
	at java.lang.reflect.Method.invoke(java.base@9-ea/Method.java:527)
	at org.netbeans.TopSecurityManager.makeSwingUseSpecialClipboard(TopSecurityManager.java:733)
	at org.netbeans.core.GuiRunLevel.run(GuiRunLevel.java:110)
	at org.netbeans.core.startup.Main.start(Main.java:320)
	at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:123)
	at java.lang.Thread.run(java.base@9-ea/Thread.java:843)

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 com.apple.eawt to unnamed module "
Full list of exports is at http://wiki.netbeans.org/JDK9Support#Running_NetBeans_on_JDK9_EA_as_run_time_Java_platform
Please check
Comment 1 webigrator 2017-10-05 08:12:50 UTC
This is occurring on Mac OS Sierra 10.12.6