question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Reason for executable Jars not resolving icons packs

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:5

github_iconTop GitHub Comments

3reactions
leonloglicommented, Dec 26, 2018

Problem solved

For maven-shade-plugin users, add this to your transformers

<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>

For more information about Resource Transformers, refer to this page

2reactions
aalmiraycommented, Aug 4, 2018

According to the documentation, this should be enough

shadowJar {
    transform(ServiceFileTransformer)
}

Or even this

shadowJar {
    mergeServiceFiles()
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Project Not showing icons after Executeable jar file
This polutes the src directory with non-source files. A cleaner solution (IMO) is to modify the build.xml file to override an appropriate target...
Read more >
Executable JARs, JFrames, and ActionListeners
I'm fairly new to Java, and am currently attempting to create my first JAR executable file. I am using the Eclipse IDE and...
Read more >
Download Selenium JARs and Configure in Eclipse
Step 1: Go to the Eclipse official website and click Download button of Eclipse IDE icon. Eclipse IDE. Step 2: Once the download...
Read more >
Fix list for IBM WebSphere Application Server V8.5
PH41889, Current javamail com.ibm.ws.prereq.javamail.jar does not work with TLS1.2 ... PH34972, Invalid properties in the ra.xml causes websphere v8.5.5.x ...
Read more >
Creating and Opening JAR Files Using the Java ...
First of all, take a look at the file, which should have the Java icon on it with the coffee cup. Also, take...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found