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

Scene Builder Kit can't be used in modular projects #719

Closed
jperedadnr opened this issue Sep 24, 2024 · 0 comments · Fixed by #720
Closed

Scene Builder Kit can't be used in modular projects #719

jperedadnr opened this issue Sep 24, 2024 · 0 comments · Fixed by #720
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@jperedadnr
Copy link
Collaborator

Scene Builder Kit is not modular (see #240 ), and adding it to another JavaFX project only works for non-modular projects.

For modular projects, it produces this exception:

Exception in Application constructor
java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:118)
...
        at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1164)
Caused by: java.lang.RuntimeException: Unable to construct Application instance: class com.gluonhq.embeddeddemo.HelloApplication
        at javafx.graphics@23/com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:883)
        at javafx.graphics@23/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:196)
        at java.base/java.lang.Thread.run(Thread.java:1575)
Caused by: java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:74)
        at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:501)
...
        at javafx.graphics@23/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
Caused by: java.lang.ExceptionInInitializerError
        at [email protected]/com.oracle.javafx.scenebuilder.kit.editor.EditorController.<init>(EditorController.java:267)
        at [email protected]/com.gluonhq.embeddeddemo.HelloApplication.<init>(HelloApplication.java:87)
        at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
        ... 8 more
Caused by: java.lang.UnsupportedOperationException: ResourceBundle.Control not supported in named modules
        at java.base/java.util.ResourceBundle.checkNamedModule(ResourceBundle.java:1538)
        at java.base/java.util.ResourceBundle.getBundle(ResourceBundle.java:902)
        at [email protected]/com.oracle.javafx.scenebuilder.kit.i18n.I18N.getBundle(I18N.java:58)
        at [email protected]/com.oracle.javafx.scenebuilder.kit.i18n.I18N.getString(I18N.java:47)
        at [email protected]/com.oracle.javafx.scenebuilder.kit.library.BuiltinLibrary.<clinit>(BuiltinLibrary.java:73)
        ... 11 more

Expected Behavior

Scene Builder (kit and app) should be modular, and ResourceBundle.Control should be removed in favour of the modular resource provider approach.

@jperedadnr jperedadnr added bug Something isn't working enhancement New feature or request labels Sep 24, 2024
@jperedadnr jperedadnr self-assigned this Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant