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
Error using the Ikonli font library java.lang.UnsupportedOperationException #11
Comments
I've setup a simple AfterburnerFx project with Ikonli 2.0.0 at https://github.com/aalmiray/sample-ikonli-app
|
I had also problem try add Ikonli to Netbeans Maven JavaFX project.
Exception:
Can you help me also? |
Are you running the application within NetBeans? The only thing I can think of right now would be a classloading issue, but even that would be quite strange if it were true. I see in your code that the there's an import statement for the Have you tried running the application on the command line alone (apply the maven-exec-java plugin)? If this works then there's some misconfiguration in NetBeans. If it does not work then there's a misconfiguration on the project's dependencies. |
I had the same issue, but only when I packaged a jar file using the maven-shade-plugin, and not in Eclipse. I was able to solve it by including the icon pack dependency before the core and swing dependencies. I don't exactly understand why though, but maybe it helps. |
This appears to be a problem caused by missing resources. If you're creating a shaded/fatjar version then you must make sure that all resources under |
ping 😼 |
I have the same problem here, the program works fine but the scene builder crash after you include FontIcon in FXML.
|
Oh sorry, in my case, was missing ikonli-fontawesome-pack in SceneBuilder
|
I will, thanks! |
I am also facing same issue. Project runs properly in IDEA. But after generating fat jar, it is failing. My dependencies
Tried Gradle fatjar, shadow jar & javafx-gradle-plugin jar.Only javafx-gradle-plugin jar worked Gradle fat jar - Not working
In generated jar under META-info/services 2 org.kordamp.ikonli.IkonHandler files are available
Shadow jar - Not working
In generated jar, under META-info/services 1 org.kordamp.ikonli.IkonHandler file is available from feather
javafx-gradle-plugin - Working https://github.com/FibreFoX/javafx-gradle-plugin Creates a jar file with classpath link to 3 ikonli jar files. It is working fine
How to make it work with shadow jar. Please help |
The last stacktrace points to a CNFE as the cause. Are you using JDK9 or greater? |
I am having the same issue when I packaged a fat jar file using the maven-shade-plugin. I am using OpenJDK 11.0.1, Javafx11.0.1 and ikonli 11.0.2
|
Problem solvedFor maven-shade-plugin users, add this to your transformers
For more information about Resource Transformers, refer to this page |
For anyone still affected:
|
Ikonli requires merging service files, or there is a runtime exception when loading a page with a FontIcon. Solution from: kordamp/ikonli#11
Ikonli requires merging service files, or there is a runtime exception when loading a page with a FontIcon. Solution from: kordamp/ikonli#11
This solution woks to me! |
I solved this by putting the icon pack dependency first in the |
@frapa this will only work if you are using one icon pack. Multiple icon packs require the use of the aforementioned transformer for maven shade. |
Correct order for dependency when building shade
The META-INF/service/org.kordamp.ikonli.IkonHandler in shade jar must have the following content org.kordamp.ikonli.fontawesome.FontAwesomeIkonHandler` |
@leonlogli not all heroes wear capes. 😊 |
Follow the font instructions from https://aalmiray.github.io/ikonli/
I use two dependencies for my javafx as follows
My XML file
ERROR
then it can work but with other dependencies i try it the above error appears
What am I missing here? What should I do to make this work? Please help me
The text was updated successfully, but these errors were encountered: