-
Notifications
You must be signed in to change notification settings - Fork 22
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
Mac OS: Image compiles and runs, but no display. #86
Comments
See related issue: gluonhq/substrate#572 You can see that you have to add the classes from the main application class to the reflection list. |
Thank you! How does this configuration look in gradle? At this point, I'm trying to add it to the gluonPlugin as a list of strings, but now it won't compile
|
That should work. What error do you get? |
After a little more checking I just had some references wrong, so the reflection list is working. I followed a few different error paths and ended up resolving a few more "unsupported feature" errors by rearranging code. I can get a basic app to display nicely, but there are a few remaining hangups: --it doesn't seem to pick up the TornadoFX stylesheet class, but no big deal since inline style is working just fine. --it can't seem to find the JavaFx resources necessary to instantiate a media player I'm including the media module with the openjfx gradle plugin like this:
Should I be including some kind of additional arguments for native image regarding javafx.media? |
What extension is your style class, css? |
The css is a tornadofx construct--no extension on the file, but the css is stored in a class like this:
Then it's compiled with type safety. Though, it doesn't seem to be working with inline style either now that I look. For some reason I thought I could get away with javaFX media player if the target was desktop--not sure where I got that idea actually. I suppose I'll look into the charm-down plugin, or libVLC or something. If it works with the css migrated to actual css files, I might just go that route. Reformatting a few files is a small price to pay for a nice binary. Thank you for all your amazing help! |
If the css class is used reflectively, try adding it to the reflectionList as well. That might work. Migrated to .css should work too, of course. |
Hello!
I've using version 1.31 of the plugin with JavaFx 11.
When I compile and run a native image, the executable runs, but no window is displayed.
In the command line I get the following exceptions:
java.lang.RuntimeException: Unable to construct Application instance: [application class name]
Caused by: java.lang.NoSuchMethodException: [application class name].()
One possible reason might have to do with the fact that it's written in Kotlin with TornadoFx.
I've tried modifying the launch method to use more java-like conventions, but to no avail.
Any idea what might be causing this?
The text was updated successfully, but these errors were encountered: