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

can you please tell me what javafx version you were using? #11

Open
ShallJaiden opened this issue Oct 27, 2021 · 1 comment
Open

can you please tell me what javafx version you were using? #11

ShallJaiden opened this issue Oct 27, 2021 · 1 comment

Comments

@ShallJaiden
Copy link

it gave me this exception

java.util.concurrent.ExecutionException: java.lang.IllegalAccessError: superclass access check failed: class com.sun.javafx.sg.prism.web.NGWebView (in unnamed module @0x5f64ef6d) cannot access class com.sun.javafx.sg.prism.NGGroup (in module javafx.graphics) because module javafx.graphics does not export com.sun.javafx.sg.prism to unnamed module @0x5f64ef6d
	at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
	at com.github.hanshsieh.pixivjjfx.stage.PixivLoginStage$Builder.buildInFxThread(PixivLoginStage.java:103)
	at Test.lambda$start$0(Test.java:23)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.IllegalAccessError: superclass access check failed: class com.sun.javafx.sg.prism.web.NGWebView (in unnamed module @0x5f64ef6d) cannot access class com.sun.javafx.sg.prism.NGGroup (in module javafx.graphics) because module javafx.graphics does not export com.sun.javafx.sg.prism to unnamed module @0x5f64ef6d
	at java.base/java.lang.ClassLoader.defineClass1(Native Method)
	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
	at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
	at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:800)
	at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:698)
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:621)
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:579)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
	at com.github.hanshsieh.pixivjjfx.stage.PixivLoginStage.<init>(PixivLoginStage.java:143)
	at com.github.hanshsieh.pixivjjfx.stage.PixivLoginStage$Builder.build(PixivLoginStage.java:87)
	at com.github.hanshsieh.pixivjjfx.stage.PixivLoginStage$Builder.lambda$buildInFxThread$0(PixivLoginStage.java:102)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
	at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
	at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
	at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:277)
	... 1 more
@hanshsieh
Copy link
Owner

I'm using OpenJFX 15.0.1 as indicated here.
Does your project use Java module? I guess the problem is related to that.
If you don't define module-info.java, your project will by default be an unnamed module.
I found this article. You can try to add --add-exports javafx.graphics/com.sun.javafx.sg.prism=ALL-UNNAMED to your javac. For maven, you can add the options as show here.
However, I would suggest you use the Java module if you haven't. I have another integration test repo, and it doesn't have the problem.
Let me know if it solves your problem.
If not, maybe you can tell me your environment, e.g. Java version? Java SE or Java EE? Windows or Unix?

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

2 participants