-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
Exception in Native Image Application Start with Ikonli #170
Comments
Line 45 points to String fontResource = handler.getFontResource().toExternalForm(); Which may be causes by missing resources in the native image. One way to solve this is for your app/consumer to explicitly lists resources that should be added to the native image. Going forward, Ikonli could provide metadata files to include these resources. |
Thank you for the prompt response! Explicitly listing resources that should be adde to the native image does the trick. My
|
One thing is to specify reflection settings, another is to define which resources should be included. Did you provide both? |
Just to be sure, I'm talking about a file like this one https://github.com/jreleaser/jreleaser/blob/main/plugins/jreleaser/src/main/resources/META-INF/native-image/org.jreleaser/jreleaser/resource-config.json where the font file should be included. |
I only specified reflection settings |
Description
When attempting to run a JavaFX application using Ikonli in a native image compiled with Liberica NIK, the application fails to start and throws the following exception:
The root cause appears to be a
NullPointerException
in the static initializer ofIkonResolver
. This issue seems to prevent the proper initialization ofFontIcon
and subsequently crashes the application.Steps to Reproduce
FontIcon
.Expected Behavior
The application should start successfully and display the JavaFX UI with the Ikonli icons.
Actual Behavior
The application crashes on startup, with the above exception being thrown.
Environment
MRE
Logs and Stack Trace
Full stack trace is provided above.
The text was updated successfully, but these errors were encountered: