Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDK10: sun.swing.CachedPainter class inaccessible #31

Open
bourgesl opened this issue May 15, 2018 · 0 comments
Open

JDK10: sun.swing.CachedPainter class inaccessible #31

bourgesl opened this issue May 15, 2018 · 0 comments

Comments

@bourgesl
Copy link
Contributor

If I run my application with java web start on Oracle JDK10, I got the following exception (Meta L&F) when a CheckBoxTree is displayed:

java.lang.IllegalAccessError: superclass access check failed: class com.jidesoft.plaf.metal.MetalUtils$GradientPainter (in unnamed module @0x32990607) cannot access class sun.swing.CachedPainter (in module java.desktop) because module java.desktop does not export sun.swing to unnamed module @0x32990607
	at java.base/java.lang.ClassLoader.defineClass1(Native Method)
	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1009)
	at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
	at jdk.deploy@10/com.sun.deploy.security.DeployURLClassLoader.defineClass(DeployURLClassLoader.java:390)
	at jdk.deploy@10/com.sun.deploy.security.DeployURLClassLoader$1.run(DeployURLClassLoader.java:289)
	at jdk.deploy@10/com.sun.deploy.security.DeployURLClassLoader$1.run(DeployURLClassLoader.java:283)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at jdk.deploy@10/com.sun.deploy.security.DeployURLClassLoader.findClass(DeployURLClassLoader.java:282)
	at jdk.javaws@10/com.sun.jnlp.JNLPClassLoader.findClass(JNLPClassLoader.java:382)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:566)
	at jdk.javaws@10/com.sun.jnlp.JNLPClassLoader.loadClass(JNLPClassLoader.java:136)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
	at com.jidesoft.plaf.metal.MetalUtils.drawGradient(MetalUtils.java:95)
	at com.jidesoft.plaf.metal.MetalIconFactory$CheckBoxIcon.paintOceanIcon(MetalIconFactory.java:63)
	at com.jidesoft.plaf.metal.MetalIconFactory$CheckBoxIcon.paintIcon(MetalIconFactory.java:87)
	at java.desktop/javax.swing.plaf.metal.MetalRadioButtonUI.paint(MetalRadioButtonUI.java:226)
	at java.desktop/javax.swing.plaf.ComponentUI.update(ComponentUI.java:161)
	at java.desktop/javax.swing.JComponent.paintComponent(JComponent.java:797)

I tried the recommended add-exports and it fixed the problem but I can not ask my users to do so:
javaws -J--add-exports=java.desktop/sun.swing=ALL-UNNAMED -verbose http://www.jmmc.fr/apps/public/AppLauncher/AppLauncher.jnlp

Do you plan to fix the GradientPainter ( extends CachedPainter ) in com.jidesoft.plaf.metal.MetalUtils or have any other workaround ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant