Skip to content
New issue

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

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

Already on GitHub? # to your account

Updating from 0.0.14 to 0.1.0 breaks working JavaFX Application #169

Closed
danielpeintner opened this issue Apr 24, 2024 · 2 comments
Closed

Comments

@danielpeintner
Copy link

I have a JavaFX application that is no longer showing/working properly the window (the controls are missing and do not react) after updating the plugin from 0.0.14 to 0.1.0.
The "funny" part is that it works fine for gradle run but it shows those strange effects after creating an executable with gradle jpackage.

To facility testing I created a rather simple dummy project that shows similar artifacts.
The project can be found here: https://github.com/danielpeintner/Java11Test/tree/non-modular

with gradle run the app (after launching) looks like this.

image

after gradle jpackage the app (after launching) looks like this.

image

When resizing/moving the window around it looks somewhat correct but the controls behave and look strangely (see for example Tab Headers etc) or buttons are not visible where they should be...

image

I am not entirely sure what causes the problem. What i noticed is that it depends a bit on the modules that are used in JavaFX.
modules = ['javafx.base', 'javafx.graphics', 'javafx.controls'] seems to work while
modules = ['javafx.controls', 'javafx.swing', 'javafx.fxml', 'javafx.media', 'javafx.web'] causes the strange behavior.

I tried to look into #154 also but didn't find a solution that works.
How can I detect the issue.. since it is difficult to get some output after jpackage.

Any hint/tip is appreciated. Thanks!

Note: it might be similar to #166 but I don't think so. The app starts fine, no errors or such...

@danielpeintner
Copy link
Author

The issue is that badass-runtime-plugin in combination with org.openjfx.javafxplugin v0.1.0 requires having all modules (transitive included) declared as "top-level" modules.

Hence, instead of

modules = ['javafx.controls']
you are required to put
modules = ['javafx.base', 'javafx.graphics', 'javafx.controls']

@MarceloRuiz
Copy link

Just to confirm, this is not the issue with #166 because all the modules are declared as 'top level' modules.

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

No branches or pull requests

2 participants