kordamp / ikonli Goto Github PK
View Code? Open in Web Editor NEWIcon packs for Java applications
Home Page: http://kordamp.org/ikonli/
License: Apache License 2.0
Icon packs for Java applications
Home Page: http://kordamp.org/ikonli/
License: Apache License 2.0
Hello,
I am using: ikonli-fontawesome-pack
and ikonli-javafx
(v2.2.0), the icons in Windows works good.
But in macOS High Sierra, all the icons shows something totally different from what it should be.
It should works in macOS as well?
Project: https://github.com/microsoft/fluentui-system-icons Note that it needs to be build from svg images.
First off thanks for this project, it's awesome!
Although font awesome is currently at version 5.6.3, and there are many new icons since the currently supported 5.0.1. Could we get an update on that?
Hi, I'm sorry if this is the improper channel to post this, but after following your guide, I'm getting stacktraces when trying to run my program from a fat jar with JavaFX. The program runs fine with all of the icons when started from my IDE, it's only when I try and run it from a fat jar that I see the problems. Is there something special I should be doing in order to have the icons included within a fat jar?
https://github.com/collinsmith/steamlinker
https://github.com/collinsmith/steamlinker/releases
https://github.com/collinsmith/steamlinker/blob/master/build.gradle
PS C:\Users\csmith\Desktop> java -jar .\steamlinker-all-1.0-SNAPSHOT.jar
[DEBUG] com.gmail.collinsmith70.steamlinker.Main::<clinit> - Clearing preferences...
[FATAL] com.gmail.collinsmith70.steamlinker.Main::start -
file:/C:/Users/csmith/Desktop/steamlinker-all-1.0-SNAPSHOT.jar!/layout/main.fxml:37
javafx.fxml.LoadException:
file:/C:/Users/csmith/Desktop/steamlinker-all-1.0-SNAPSHOT.jar!/layout/main.fxml:37
at javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2601)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2579)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2441)
at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2409)
at com.gmail.collinsmith70.steamlinker.Main.start(Main.java:75)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: javafx.fxml.LoadException:
file:/C:/Users/csmith/Desktop/steamlinker-all-1.0-SNAPSHOT.jar!/layout/repos.fxml:24
at com.gmail.collinsmith70.steamlinker.ReposControl.<init>(ReposControl.java:56)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at sun.reflect.misc.ReflectUtil.newInstance(ReflectUtil.java:51)
at javafx.fxml.FXMLLoader$InstanceDeclarationElement.constructValue(FXMLLoader.java:1009)
at javafx.fxml.FXMLLoader$ValueElement.processStartElement(FXMLLoader.java:746)
at javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2707)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2527)
... 12 more
Caused by: javafx.fxml.LoadException:
file:/C:/Users/csmith/Desktop/steamlinker-all-1.0-SNAPSHOT.jar!/layout/repos.fxml:24
at javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2601)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2579)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2441)
at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2409)
at com.gmail.collinsmith70.steamlinker.ReposControl.<init>(ReposControl.java:54)
... 22 more
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.sun.javafx.fxml.BeanAdapter.put(BeanAdapter.java:262)
at com.sun.javafx.fxml.BeanAdapter.put(BeanAdapter.java:54)
at javafx.fxml.FXMLLoader$Element.applyProperty(FXMLLoader.java:512)
at javafx.fxml.FXMLLoader$Element.processValue(FXMLLoader.java:363)
at javafx.fxml.FXMLLoader$Element.processPropertyAttribute(FXMLLoader.java:325)
at javafx.fxml.FXMLLoader$Element.processInstancePropertyAttributes(FXMLLoader.java:235)
at javafx.fxml.FXMLLoader$ValueElement.processEndElement(FXMLLoader.java:767)
at javafx.fxml.FXMLLoader.processEndElement(FXMLLoader.java:2823)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2532)
... 25 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)
at com.sun.javafx.fxml.BeanAdapter.put(BeanAdapter.java:258)
... 33 more
Caused by: java.lang.UnsupportedOperationException: Cannot resolve 'gmi-add'
at org.kordamp.ikonli.javafx.IkonResolver.resolveIkonHandler(IkonResolver.java:60)
at org.kordamp.ikonli.javafx.FontIcon.setIconLiteral(FontIcon.java:232)
... 44 more
I want to add an icon to a jfxbutton(from JFoenix) during runtime. I used
button.setGraphic(new FontIcon(Material.CHECK));
it throws a lot of errors
Hi Andreas,
like I said in twitter I was a little confuse as I tried to inject the library through maven central in my maven project. With your help I was able to fix my pom with:
<repositories>
<repository>
<id>central</id>
<name>bintray</name>
<url>http://jcenter.bintray.com</url>
</repository>
</repositories>
As I see you have a fantastic guide for your project, so I think it would be a good idea to extend the guide about this informations. What do you mean?
Greetings
Peter
FontAwesome5 pack v11.2.0 isn't working with JavaFX 12.
I'm using JavaFX 11, JRE 11 and Scene Builder 11.
When I try to import ikonli-javafx-11.0.2.jar into Scene Builder the only components I get are FontIconTableCell and StackedFontIcon.
How can I get font icons?
Icon not aligned correctly (not centered vertically) with text on labels and buttons.
Here's the test code:
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import javax.swing.BorderFactory;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import org.kordamp.ikonli.material.Material;
import org.kordamp.ikonli.swing.FontIcon;
import org.openide.util.Exceptions;
/**
*
* @author MethoD
*/
public class OnlineUserStatusLineElementTest {
public static void main(String[] args) {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) {
Exceptions.printStackTrace(ex);
}
JLabel label = new JLabel("test text");
FontIcon icon = new FontIcon();
label.setHorizontalAlignment(SwingConstants.CENTER);
label.setPreferredSize(new Dimension(200, 20));
// icon
icon.setIkon(Material.PEOPLE);
icon.setIconSize(20);
label.setIcon(icon);
label.setBorder(BorderFactory.createLineBorder(Color.black));
JPanel panel = new JPanel();
panel.setLayout(new BorderLayout());
panel.add(label, BorderLayout.NORTH);
JFrame frame = new JFrame();
frame.setLayout(new BorderLayout());
frame.add(panel, BorderLayout.CENTER);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setLocationRelativeTo(null);
frame.setSize(640, 480);
frame.setVisible(true);
}
}
I'm currently working on Windows 10 Pro with Gradle. I updated from v11.1.0 which was working perfectly with JDK and JavaFX 11/12 to v11.3.0 and now all I get is an empty rectangle instead of icons.
According to #48, it was already fixed, but I'm unable to make it work.
In version 11.3.5 the "core" module uses the identifier "org.kordamp.iconli.core" instead of "org.kordamp.ikonli.core" (a "c" instead of a "k"). So the spelling, by accident, is correct .... but the code is wrong :-)
In my module-info.java I now have to write:
requires org.kordamp.iconli.core;
requires org.kordamp.ikonli.javafx;
requires org.kordamp.ikonli.materialdesign;
Hi Andres,
I've been hitting my head against the wall for a day now trying to use ikonli in an OSGi project. Even after creating a bundle and reexporting all the packages the application cannot find org.kordamp.ikonli.javafx.FontIcon
Would it be possible to include the OSGi metadata in future releases so the library can work seamlessly on OSGi projects too?
Thanks!
Marcelo.
It would be nice if the latest Ikonli release would support older Java versions as well. Java 8 is still very commonly used. Or is there a technical reason Java 11 is required?
With newer Java versions one can use the "--release" compiler option to produce compatible classes.
Hi Andres,
I made a very simple javafx app to browse all the Ikonli icons (since searching the cheat sheets was very time consuming).
On the left side there is a toolbar with a button for each icon family and when you click on it it populates the main area with buttons for each of the icons in the family. Each of those buttons display a tooltip with the ikonli code for the icon or you can click on the button to have the code copied to the clipboard. Let me know if you are interested: I am happy to send you the code.
I attached the executable jar in case you want to see it (I just added the .zip extension so I could upload it).
Best,
Marcelo.
IkonliBrowser.jar.zip
I'm updating from font-awesome to font-awesome5 and I'm getting this error:
Caused by: java.lang.IllegalArgumentException: Icon description 'fas-globe' is invalid!
at org.kordamp.ikonli.fontawesome5.FontAwesomeRegular.findByDescription(FontAwesomeRegular.java:146)
at org.kordamp.ikonli.fontawesome5.FontAwesomeSolidIkonHandler.resolve(FontAwesomeSolidIkonHandler.java:35)
at org.kordamp.ikonli.javafx.FontIcon.setIconLiteral(FontIcon.java:252)
The code that tries to use it looks like this:
<Tab closable="false" text="Web Sites">
<graphic>
<FontIcon iconLiteral="fas-globe"/>
</graphic>
I can see fas-globe
defined on FontAwesomeSolid
but not FontAwesomeRegular
. I'm not sure why FontAwesomeRegular
is being used.
Follow the font instructions from https://aalmiray.github.io/ikonli/
I use two dependencies for my javafx as follows
<dependency>
<groupId>org.kordamp.ikonli</groupId>
<artifactId>ikonli-javafx</artifactId>
<version>1.9.0</version>
</dependency>
<dependency>
<groupId>org.kordamp.ikonli</groupId>
<artifactId>ikonli-fontawesome-pack</artifactId>
<version>1.9.0</version>
</dependency>
My XML file
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.layout.VBox?>
<?import org.kordamp.ikonli.javafx.FontIcon?>
<VBox id="VBox" xmlns="http://javafx.com/javafx/8.0.141" xmlns:fx="http://javafx.com/fxml/1" fx:controller="touya.akira.parser.ParserPresenter">
<children>
<Button mnemonicParsing="false">
<graphic>
<FontIcon iconLiteral="fa-address-book" />
</graphic>
</Button>
</children>
</VBox>
ERROR
--- exec-maven-plugin:1.2.1:exec (default-cli) @ Touya-Akira ---
Exception in Application start method
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389)
at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$155(LauncherImpl.java:182)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: Cannot load touya.akira.parser.parser
at com.airhacks.afterburner.views.FXMLView.loadSynchronously(FXMLView.java:101)
at com.airhacks.afterburner.views.FXMLView.initializeFXMLLoader(FXMLView.java:125)
at com.airhacks.afterburner.views.FXMLView.getView(FXMLView.java:137)
at touya.akira.MainApp.start(MainApp.java:16)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
... 1 more
Caused by: javafx.fxml.LoadException:
file:/E:/Java/NetBeansProjects/Touya-Akira/main/1.0.6/Touya-Akira/target/Touya-Akira-1.0.6.jar!/touya/akira/parser/parser.fxml:13
at javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2601)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2579)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2441)
at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2409)
at com.airhacks.afterburner.views.FXMLView.loadSynchronously(FXMLView.java:99)
... 12 more
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.sun.javafx.fxml.BeanAdapter.put(BeanAdapter.java:262)
at com.sun.javafx.fxml.BeanAdapter.put(BeanAdapter.java:54)
at javafx.fxml.FXMLLoader$Element.applyProperty(FXMLLoader.java:512)
at javafx.fxml.FXMLLoader$Element.processValue(FXMLLoader.java:363)
at javafx.fxml.FXMLLoader$Element.processPropertyAttribute(FXMLLoader.java:325)
at javafx.fxml.FXMLLoader$Element.processInstancePropertyAttributes(FXMLLoader.java:235)
at javafx.fxml.FXMLLoader$ValueElement.processEndElement(FXMLLoader.java:767)
at javafx.fxml.FXMLLoader.processEndElement(FXMLLoader.java:2823)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2532)
... 15 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)
at com.sun.javafx.fxml.BeanAdapter.put(BeanAdapter.java:258)
... 23 more
Caused by: java.lang.UnsupportedOperationException: Cannot resolve 'fa-circle-thin'
at org.kordamp.ikonli.javafx.IkonResolver.resolveIkonHandler(IkonResolver.java:60)
at org.kordamp.ikonli.javafx.FontIcon.setIconLiteral(FontIcon.java:232)
... 34 more
Exception running application touya.akira.MainApp
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 5.914s
Finished at: Fri Sep 29 08:49:05 ICT 2017
Final Memory: 14M/35M
But if I use dependencies
<dependency>
<groupId>org.kordamp.ikonli</groupId>
<artifactId>ikonli-devicons-pack</artifactId>
<version>1.9.0</version>
</dependency>
<FontIcon iconLiteral="di-android" />
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
I am having trouble building the project under Linux. I follow all the steps and set the variables correctly (actually tried both setting them to the java parent folder and to the bin folder of each version of java: /usr/lib/jvm/java-X-oracle/ and /usr/lib/jvm/java-X-oracle/bin/) but the resolution of java8 home fails in both cases (it adds the bin folder twice:
`
marcelo@marcelo-desktop:/tmp/ikonli$ย export JAVA_8=/usr/lib/jvm/java-8-oracle/
marcelo@marcelo-desktop:/tmp/ikonli$ย export JAVA_9=/usr/lib/jvm/java-9-oracle/
marcelo@marcelo-desktop:/tmp/ikonli$ย echo $JAVA_8
/usr/lib/jvm/java-8-oracle/
marcelo@marcelo-desktop:/tmp/ikonli$ย ls $JAVA_8
bin COPYRIGHT include javafx-src.zip jre lib LICENSE man README.html release src.zip THIRDPARTYLICENSEREADME-JAVAFX.txt THIRDPARTYLICENSEREADME.txt
marcelo@marcelo-desktop:/tmp/ikonli$ย echo $JAVA_9
/usr/lib/jvm/java-9-oracle/
marcelo@marcelo-desktop:/tmp/ikonli$ย ls $JAVA_9
appletviewer jar javac javap javaws.real jcontrol jdeps jinfo jmap jps jstack jweblauncher pack200 rmid serialver unpack200 xjc idlj jarsigner javadoc javapackager jcmd jdb jhsdb jjs jmc jrunscript stat keytool policytool rmiregistry servertool wsgen jaotc java javah javaws jconsole jdeprscan jimage link jmod jshell jstatd orbd rmic schemagen tnameserv wsimport
marcelo@marcelo-desktop:/tmp/ikonli$ย ./gradlew build
Task :ikonli-javafx:compileJava FAILED
FAILURE: Build failed with an exception.
The supplied javaHome seems to be invalid. I cannot find the java executable. Tried location: /usr/lib/jvm/java-8-oracle/bin/bin/java
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.7/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 10s
123 actionable tasks: 58 executed, 65 up-to-date
marcelo@marcelo-desktop:/tmp/ikonli$
`
Hi,
I am trying to extends with my own SVG images but not succeed. Could you please have a short guide and advise tool to produce fonts?
At the time of this writing the link to the guide leads to a 404 Page Not Found GitHub page
Let an icon literal contain additional definitions for size and color, such as
While using the FontAwesome pack I noticed it includes all the file format variants of the FontAwesome font (otf
, ttf
, woff
, woff2
, eot
and a super heavy svg
) while perhaps only the TrueType format is needed (ttf
).
By removing all the unused file formats a substantial reduction in file size could be achieved, for the FontAwesome pack the ttf
compressed size is about 98 Kb while now the total size is about 600 Kb
For the first time did I try to bind the icon shown by a FontIcon to an ObjectProperty of type Ikon and I noticed that changing the value of this property would not update the font icon.
My javafx Project runs properly in IDEA. But after generating fat jar, it is failing.
My dependencies
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
compile 'org.kordamp.ikonli:ikonli-javafx:2.1.1'
compile 'org.kordamp.ikonli:ikonli-feather-pack:2.1.1'
}
Tried Gradle fatjar, shadow jar & javafx-gradle-plugin jar.Only javafx-gradle-plugin jar worked
Gradle fat jar - Not working
task fatJar(type: Jar) {
manifest.from jar.manifest
baseName = project.name + '-all'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
In generated jar under META-info/services 2 org.kordamp.ikonli.IkonHandler files are available
Caused by: java.lang.UnsupportedOperationException: Cannot resolve 'fth-speech-bubble'
at org.kordamp.ikonli.javafx.IkonResolver.resolveIkonHandler(IkonResolver.java:60)
at org.kordamp.ikonli.javafx.FontIcon.setIconLiteral(FontIcon.java:252)
at Main.start(Main.java:18)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:919)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$11(PlatformImpl.java:449)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$9(PlatformImpl.java:418)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:417)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:175)
Shadow jar - Not working
shadowJar {
baseName = 'shadowjar'
mergeServiceFiles() //For Merging Service Descriptor Files
}
In generated jar, under META-info/services 1 org.kordamp.ikonli.IkonHandler file is available from feather
Caused by: java.lang.NoClassDefFoundError: com/sun/javafx/css/converters/SizeConverter
at org.kordamp.ikonli.javafx.FontIcon$StyleableProperties.<clinit>(FontIcon.java:265)
at org.kordamp.ikonli.javafx.FontIcon.getClassCssMetaData(FontIcon.java:321)
at org.kordamp.ikonli.javafx.FontIcon.getCssMetaData(FontIcon.java:325)
at javafx.graphics/javafx.scene.CssStyleHelper$CacheContainer.<init>(CssStyleHelper.java:402)
at javafx.graphics/javafx.scene.CssStyleHelper$CacheContainer.<init>(CssStyleHelper.java:362)
at javafx.graphics/javafx.scene.CssStyleHelper.createStyleHelper(CssStyleHelper.java:177)
at javafx.graphics/javafx.scene.Node.reapplyCss(Node.java:9442)
at javafx.graphics/javafx.scene.Node.reapplyCSS(Node.java:9405)
at javafx.graphics/javafx.scene.Node.invalidatedScenes(Node.java:1087)
at javafx.graphics/javafx.scene.Node.setScenes(Node.java:1152)
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
Class-Path: lib/ikonli-feather-pack-2.1.1.jar lib/ikonli-core-2.1.1.jar lib/ikonli-javafx-2.1.1.jar
Hello,
The old link I used to find all the available icons doesn't work anymore.
The link was : https://aalmiray.github.io/ikonli/cheat-sheet-fontawesome5.html
I have search in this repo, the fontawesome5 adoc document seems broken by missing some inner part.
Furthermore when I try to go to the guide, I get an error : seems like the site kordamp.org is not up.
Hi,
The links for the cheat sheets seem dead. I think it may just be a matter of configuration on github.
Thanks
Some people still use Maven ;)
Good day.
There are several open issues (#11, #24) that have a problem of executable jar
(with dependencies being extracted to this executable jar
, instead of linked by manifest to their respective jars) not being able to to resolve icon packs. A workaround was proposed in this post, that suggests to move the icon dependency up the hierarchy. I've figured out the reason why it matters: both ikonli.core
and ikonli.<icon pack>
have a org.kordamp.ikonli.IkonHandler
file in META-INF/services
directory. For the application to successfully resolve icons, the ikonli.<icon pack>
's version of the file has to be included in the executable jar
. In certain cases this can be alleviated by altering dependency order (like in IntelliJ). But in other cases (like Gradle's jar
task) there's no way of specifying the order in which dependendencies should be extracted (or is there?). Nevertheless, the main point is that this is an issue that has to be handled by library itself, rather than leaving users of this library scratching their heads.
Your response is very much appreciated.
Hey @aalmiray, What is missing here ?
Hi, I am trying to use the ikonli with Java 8 + maven + Swing:
I am using Mac OS
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.group</groupId>
<artifactId>test</artifactId>
<version>1.0.0</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.*</include>
</includes>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.*</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<dependencies>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-surefire-provider</artifactId>
<version>1.2.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.kordamp.ikonli</groupId>
<artifactId>ikonli-swing</artifactId>
<version>11.3.4</version>
</dependency>
<dependency>
<groupId>org.kordamp.ikonli</groupId>
<artifactId>ikonli-fontawesome5-pack</artifactId>
<version>11.3.4</version>
</dependency>
</dependencies>
</project>
My class has the main method:
public static void main(String args[]) {
JLabel label = new JLabel("Hello");
label.setIcon(FontIcon.of(ACCESSIBLE_ICON));
JFrame frame = new JFrame("Testing");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setLayout(new GridBagLayout());
frame.add(label);
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
}
It downloaded all the libraries correctly, but when I compile the project I get the error below:
App.java:[33,32] cannot access org.kordamp.ikonli.swing.FontIcon
bad class file: /Users/user/.m2/repository/org/kordamp/ikonli/ikonli-swing/11.3.4/ikonli-swing-11.3.4.jar(org/kordamp/ikonli/swing/FontIcon.class)
class file has wrong version 55.0, should be 52.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
I don't really have any issues at the moment. I just thought this might be a good place to post a solution to a problem I had, in case someone else runs into it.
If this is not the right place, I apologize and will delete this if it's possible once posted.
So, recently I got this error: java.lang.ClassNotFoundException: org.kordamp.ikonli.javafx.FontIcon
I'm not using neither Gradle nor Maven. (I know Gradle is a minimum).
A couple of days ago, I followed this video guide to set Ikonli up. I imported the .jars
using the Maven repository in the SceneBuilder. It worked for the moment without even having added the repositories to the IDE (IntelliJ), so I turned off my machine and went to sleep. Then the next day I would get a very similar problem to this one. I tried adding the javafx Ikonli jar as a library to IntelliJ, but to no effect. Tried adding the .jars
in the SceneBuilder (core, javafx and fontawesome5), but it still wouldn't show an icon nor compile. When I looked at the fxml
file, it it had the <import? ......?>
in red because it couldn't find any suitable libraries.
So, it hit me and I did the following (don't know if the order is important):
I removed any .jars
I had in IntelliJ/SceneBuilder that had to do with Ikonli and decided to re-add everything, starting with SceneBuilder, where I first added the core
jar
, then the javafx
and finally the fontawesome5
as shown in the video above. After that, I downloaded the same files from the bintray and added them to IntelliJ as libraries.
After that, everything, at least so far, works absolutely fine.
I know this is probably just my misunderstanding of how things work and not a problem with Ikonli or SceneBuilder and I apologize again if this is not the right place. I just don't know where to post this solution for other less knowledgeable people to see.
P.S. Thank you for developing this and sharing it. ๐
Here's a c
:
Here are k
s:
core/ikonli-core
directorypackage org.kordamp.ikonli;
in "core"Calling FontIcon#setIconLiteral many times, produces an OutOfMemoryException.
This line is likely to be the problem: setStyle(getStyle() + "-fx-font-family: '" + ikonHandler.getFontFamily() + "';");
Im using scene builder version 10.0.0. imported all the jar ikonli-core, ikonli-javafx,ikonli-fontawesome all the jar version 11.0.0 to scene builder library manager but none of these jar have component when imported ,so im unable to use fonticon.
Forgetting to set the ikon property but setting the size as in:
FontIcon fi = new FontIcon();
fi.setIconSize(32);
jLabel.setIcon(fi);
leads to:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at org.kordamp.ikonli.swing.FontIcon.setIconSize(FontIcon.java:92)
at af.AppFrame.<init>(AppFrame.java:15)
...
This is because the font
variable in FontIcon
is left uninitialized but used in the setIconSize
method.
Perhaps the ikon
property should be required as a constructor argument?
Gradle fails to build on Windows with included Gradle Wrapper.
Command: .\gradlew.bat build
Windows Version: 10 (1909)
Java Version:
openjdk 11 2018-09-25
OpenJDK Runtime Environment 18.9 (build 11+28)
OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)
.\gradlew.bat build -S
:
Downloading https://services.gradle.org/distributions/gradle-6.3-bin.zip
.........10%..........20%..........30%.........40%..........50%..........60%.........70%..........80%..........90%..........100%
Welcome to Gradle 6.3!
Here are the highlights of this release:
- Java 14 support
- Improved error messages for unexpected failures
For more details see https://docs.gradle.org/6.3/release-notes.html
Starting a Gradle Daemon (subsequent builds will be faster)
Kordamp Enforcer Gradle plugins 0.1.0. Consider becoming a patron at https://www.patreon.com/aalmiray
Kordamp Gradle plugins 0.34.0. Consider becoming a patron at https://www.patreon.com/aalmiray
> Configure project :
Project :ikonli-core => 'org.kordamp.iconli.core' Java module
Project :ikonli-dashicons-pack => 'org.kordamp.ikonli.dashicons' Java module
Project :ikonli-devicons-pack => 'org.kordamp.ikonli.devicons' Java module
Project :ikonli-elusive-pack => 'org.kordamp.ikonli.elusive' Java module
Project :ikonli-entypo-pack => 'org.kordamp.ikonli.entypo' Java module
Project :ikonli-feather-pack => 'org.kordamp.ikonli.feather' Java module
Project :ikonli-fontawesome-pack => 'org.kordamp.ikonli.fontawesome' Java module
Project :ikonli-fontawesome5-pack => 'org.kordamp.ikonli.fontawesome5' Java module
Project :ikonli-fontelico-pack => 'org.kordamp.ikonli.fontelico' Java module
Project :ikonli-foundation-pack => 'org.kordamp.ikonli.foundation' Java module
Project :ikonli-hawconsfilled-pack => 'org.kordamp.ikonli.hawconsfilled' Java module
Project :ikonli-hawconsstroke-pack => 'org.kordamp.ikonli.hawconsstroke' Java module
Project :ikonli-icomoon-pack => 'org.kordamp.ikonli.icomoon' Java module
Project :ikonli-ionicons-pack => 'org.kordamp.ikonli.ionicons' Java module
Project :ikonli-ionicons4-pack => 'org.kordamp.ikonli.ionicons4' Java module
Project :ikonli-javafx => 'org.kordamp.ikonli.javafx' Java module
Project :ikonli-ligaturesymbols-pack => 'org.kordamp.ikonli.ligaturesymbols' Java module
Project :ikonli-linecons-pack => 'org.kordamp.ikonli.linecons' Java module
Project :ikonli-maki-pack => 'org.kordamp.ikonli.maki' Java module
Project :ikonli-maki2-pack => 'org.kordamp.ikonli.maki2' Java module
Project :ikonli-mapicons-pack => 'org.kordamp.ikonli.mapicons' Java module
Project :ikonli-material-pack => 'org.kordamp.ikonli.material' Java module
Project :ikonli-materialdesign-pack => 'org.kordamp.ikonli.materialdesign' Java module
Project :ikonli-metrizeicons-pack => 'org.kordamp.ikonli.metrizeicons' Java module
Project :ikonli-ociicons-pack => 'org.kordamp.ikonli.ociicons' Java module
Project :ikonli-octicons-pack => 'org.kordamp.ikonli.octicons' Java module
Project :ikonli-openiconic-pack => 'org.kordamp.ikonli.openiconic' Java module
Project :ikonli-paymentfont-pack => 'org.kordamp.ikonli.paymentfont' Java module
Project :ikonli-runestroicons-pack => 'org.kordamp.ikonli.runestroicons' Java module
Project :ikonli-swing => 'org.kordamp.ikonli.swing' Java module
Project :ikonli-themify-pack => 'org.kordamp.ikonli.themify' Java module
Project :ikonli-typicons-pack => 'org.kordamp.ikonli.typicons' Java module
Project :ikonli-weathericons-pack => 'org.kordamp.ikonli.weathericons' Java module
Project :ikonli-websymbols-pack => 'org.kordamp.ikonli.websymbols' Java module
Project :ikonli-zondicons-pack => 'org.kordamp.ikonli.zondicons' Java module
Project :sampler-javafx => 'org.kordamp.ikonli.sampler.javafx' Java module
Project :sampler-swing => 'org.kordamp.ikonli.sampler.swing' Java module
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'ikonli'.
> Failed to notify project evaluation listener.
> Unexpected internal error near index 1
\
> java.lang.NullPointerException (no error message)
> Cannot get property 'licensing' on null object
> java.lang.NullPointerException (no error message)
> java.lang.NullPointerException (no error message)
> java.lang.NullPointerException (no error message)
* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Exception is:
org.gradle.api.ProjectConfigurationException: A problem occurred configuring root project 'ikonli'.
at org.gradle.configuration.project.LifecycleProjectEvaluator.wrapException(LifecycleProjectEvaluator.java:75)
at org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:68)
at org.gradle.configuration.project.LifecycleProjectEvaluator.access$600(LifecycleProjectEvaluator.java:51)
at org.gradle.configuration.project.LifecycleProjectEvaluator$NotifyAfterEvaluate.run(LifecycleProjectEvaluator.java:194)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:402)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:394)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:92)
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
at org.gradle.configuration.project.LifecycleProjectEvaluator$EvaluateProject$1.run(LifecycleProjectEvaluator.java:107)
at org.gradle.internal.Factories$1.create(Factories.java:26)
at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:189)
at org.gradle.internal.work.StopShieldingWorkerLeaseService.withLocks(StopShieldingWorkerLeaseService.java:40)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.withProjectLock(DefaultProjectStateRegistry.java:271)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.withMutableState(DefaultProjectStateRegistry.java:265)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.withMutableState(DefaultProjectStateRegistry.java:226)
at org.gradle.configuration.project.LifecycleProjectEvaluator$EvaluateProject.run(LifecycleProjectEvaluator.java:91)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:402)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:394)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:92)
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:63)
at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:707)
at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:143)
at org.gradle.execution.TaskPathProjectEvaluator.configure(TaskPathProjectEvaluator.java:36)
at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:62)
at org.gradle.configuration.DefaultProjectsPreparer.prepareProjects(DefaultProjectsPreparer.java:61)
at org.gradle.configuration.BuildOperatingFiringProjectsPreparer$ConfigureBuild.run(BuildOperatingFiringProjectsPreparer.java:52)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:402)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:394)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:92)
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
at org.gradle.configuration.BuildOperatingFiringProjectsPreparer.prepareProjects(BuildOperatingFiringProjectsPreparer.java:40)
at org.gradle.initialization.DefaultGradleLauncher.prepareProjects(DefaultGradleLauncher.java:218)
at org.gradle.initialization.DefaultGradleLauncher.doClassicBuildStages(DefaultGradleLauncher.java:155)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:140)
at org.gradle.initialization.DefaultGradleLauncher.executeTasks(DefaultGradleLauncher.java:120)
at org.gradle.internal.invocation.GradleBuildController$1.create(GradleBuildController.java:74)
at org.gradle.internal.invocation.GradleBuildController$1.create(GradleBuildController.java:67)
at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:189)
at org.gradle.internal.work.StopShieldingWorkerLeaseService.withLocks(StopShieldingWorkerLeaseService.java:40)
at org.gradle.internal.invocation.GradleBuildController.doBuild(GradleBuildController.java:67)
at org.gradle.internal.invocation.GradleBuildController.run(GradleBuildController.java:56)
at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:31)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.launcher.exec.BuildOutcomeReportingBuildActionRunner.run(BuildOutcomeReportingBuildActionRunner.java:63)
at org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.java:32)
at org.gradle.launcher.exec.BuildCompletionNotifyingBuildActionRunner.run(BuildCompletionNotifyingBuildActionRunner.java:39)
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.java:51)
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.java:45)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:416)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:406)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:102)
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.java:45)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$1.transform(InProcessBuildActionExecuter.java:50)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$1.transform(InProcessBuildActionExecuter.java:47)
at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.java:80)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:47)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:31)
at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:42)
at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:28)
at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:78)
at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:52)
at org.gradle.tooling.internal.provider.SubscribableBuildActionExecuter.execute(SubscribableBuildActionExecuter.java:60)
at org.gradle.tooling.internal.provider.SubscribableBuildActionExecuter.execute(SubscribableBuildActionExecuter.java:38)
at org.gradle.tooling.internal.provider.SessionScopeBuildActionExecuter.execute(SessionScopeBuildActionExecuter.java:68)
at org.gradle.tooling.internal.provider.SessionScopeBuildActionExecuter.execute(SessionScopeBuildActionExecuter.java:38)
at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:37)
at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:26)
at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:43)
at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:29)
at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:60)
at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:32)
at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:55)
at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:41)
at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:48)
at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:32)
at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:68)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:39)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:29)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:35)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:78)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:75)
at org.gradle.util.Swapper.swap(Swapper.java:38)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:75)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:63)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:82)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:52)
at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.gradle.internal.event.ListenerNotificationException: Failed to notify project evaluation listener.
at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:86)
at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:325)
at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:235)
at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:141)
at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:37)
at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
at com.sun.proxy.$Proxy45.afterEvaluate(Unknown Source)
at org.gradle.configuration.project.LifecycleProjectEvaluator$NotifyAfterEvaluate$1.execute(LifecycleProjectEvaluator.java:186)
at org.gradle.configuration.project.LifecycleProjectEvaluator$NotifyAfterEvaluate$1.execute(LifecycleProjectEvaluator.java:183)
at org.gradle.api.internal.project.DefaultProject.stepEvaluationListener(DefaultProject.java:1446)
at org.gradle.configuration.project.LifecycleProjectEvaluator$NotifyAfterEvaluate.run(LifecycleProjectEvaluator.java:192)
... 115 more
Caused by: java.util.regex.PatternSyntaxException: Unexpected internal error near index 1
\
at java.base/java.util.regex.Pattern.error(Pattern.java:2015)
at java.base/java.util.regex.Pattern.compile(Pattern.java:1784)
at java.base/java.util.regex.Pattern.<init>(Pattern.java:1427)
at java.base/java.util.regex.Pattern.compile(Pattern.java:1068)
at java.base/java.lang.String.split(String.java:2317)
at java.base/java.lang.String.split(String.java:2364)
at org.kordamp.gradle.plugin.base.plugins.Stats$_defaultPaths_closure1$_closure2.doCall(Stats.groovy:80)
at org.kordamp.gradle.plugin.base.plugins.Stats$_defaultPaths_closure1$_closure2.call(Stats.groovy)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2330)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2315)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2356)
at org.kordamp.gradle.plugin.base.plugins.Stats$_defaultPaths_closure1.doCall(Stats.groovy:79)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:101)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:263)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1041)
at groovy.lang.Closure.call(Closure.java:405)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.callClosureForMapEntry(DefaultGroovyMethods.java:5961)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2407)
at org.kordamp.gradle.plugin.base.plugins.Stats.defaultPaths(Stats.groovy:60)
at org.kordamp.gradle.plugin.base.plugins.Stats.postMerge(Stats.groovy:124)
at org.kordamp.gradle.plugin.base.ProjectConfigurationExtension.postMerge(ProjectConfigurationExtension.groovy:501)
at org.kordamp.gradle.plugin.base.BasePlugin$_apply_closure1.doCall(BasePlugin.groovy:289)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:101)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:263)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1041)
at groovy.lang.Closure.call(Closure.java:405)
at org.gradle.configuration.internal.DefaultListenerBuildOperationDecorator$BuildOperationEmittingClosure$1.lambda$run$0(DefaultListenerBuildOperationDecorator.java:180)
at org.gradle.configuration.internal.DefaultUserCodeApplicationContext.reapply(DefaultUserCodeApplicationContext.java:60)
at org.gradle.configuration.internal.DefaultListenerBuildOperationDecorator$BuildOperationEmittingClosure$1.run(DefaultListenerBuildOperationDecorator.java:177)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:402)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:394)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:92)
at org.gradle.configuration.internal.DefaultListenerBuildOperationDecorator$BuildOperationEmittingClosure.doCall(DefaultListenerBuildOperationDecorator.java:174)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:101)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1217)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1041)
at groovy.lang.Closure.call(Closure.java:405)
at org.gradle.listener.ClosureBackedMethodInvocationDispatch.dispatch(ClosureBackedMethodInvocationDispatch.java:41)
at org.gradle.listener.ClosureBackedMethodInvocationDispatch.dispatch(ClosureBackedMethodInvocationDispatch.java:25)
at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:42)
at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:231)
at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:150)
at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:58)
... 125 more
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.3/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 2m 34s
Seems to be related to Gradle or one of the project dependencies.
Consider the following examples
A nice enhancement could be to provide a convenient static factory method in the FontIcon
class allowing to write for example:
JLabel label=new JLabel(FontIcon.of(FontAwesome.AMBULANCE, 32, Color.red));
Hi , I found a bug or it's just because we have to use iconSize only with iconCode
iconSize="24" iconLiteral="ion-android-volume-off"
don't change the size
iconLiteral="ion-android-volume-off:24"
set the size to 24 px
Thanks
I don't know whether is it a JDK 9 bug, but I get the following error while using ikonli.
java.lang.NoClassDefFoundError: Could not initialize class org.kordamp.ikonli.javafx.FontIcon$StyleableProperties
at org.kordamp.ikonli.javafx.FontIcon.getClassCssMetaData(FontIcon.java:301)
at org.kordamp.ikonli.javafx.FontIcon.getCssMetaData(FontIcon.java:305)
at javafx.graphics/javafx.scene.CssStyleHelper$CacheContainer.<init>(CssStyleHelper.java:380)
Do you have any opinion for that?
Thanks.
Service files must be merged when packaging an application as a fatjar
Caused by: java.lang.NullPointerException
at org.kordamp.ikonli.javafx/org.kordamp.ikonli.javafx.FontIcon.toString(FontIcon.java:112)
at java.base/java.lang.String.valueOf(String.java:2951)
at java.base/java.io.PrintStream.println(PrintStream.java:897)
at org.kordamp.ikonli.sampler.javafx/org.kordamp.ikonli.sampler.javafx.Sampler.start(Sampler.java:82)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:846)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:455)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
this would be the correct link:
https://feathericons.com
Forgetting to set the icon size as in:
FontIcon fi = new FontIcon();
fi.setIkon(FontAwesome.AMBULANCE);
jLabel.setIcon(fi);
leads to:
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Width (0) and height (0) cannot be <= 0
at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1016)
at java.awt.image.BufferedImage.<init>(BufferedImage.java:333)
at org.kordamp.ikonli.swing.FontIcon.paintIcon(FontIcon.java:51)
at sun.swing.plaf.synth.SynthIcon.paintIcon(SynthIcon.java:67)
...
This is because the height
and width
members in FontIcon
are left uninitialized, they could be set as the default iconSize
(16)
https://github.com/kordamp/ikonli points to https://kordamp.org/ikonli/
https://kordamp.org/ikonli/#_swing points to https://kordamp.org/ikonli/api/org/kordamp/ikonli/swing/FontIcon.html
That last link is 404
Is is possible to publish a release with a current version of Material Design Icons?
Looks like the Ikonli version (1.7.22) is quite a bit older than the current version (5.1.45).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.