Dependency error in jasper-reports from itext

A much simpler solution may be to upgrade to a newer version of jasperreports. Version 6.1.0 has this dependency on iText: <dependency> <groupId>com.lowagie</groupId> <artifactId>itext</artifactId> <version>2.1.7.js2</version> <scope>compile</scope> </dependency> No more “floating” dependency on iText, and it’s a version that’s custom made for jasperreports! See http://mvnrepository.com/artifact/net.sf.jasperreports/jasperreports/6.1.0 for the complete pom.xml.

Why spring boot generates jar or war file with .original extension?

The answer is that you are using repackage goal in your spring-boot-maven-plugin. So, What it does? Maven first builds your project and packages your classes and resources into a WAR (${artifactId}.war) file. Then, repackaging happens. In this goal, all the dependencies mentioned in the pom.xml are packaged inside a new WAR (${artifactId}.war) and the previously … Read more

Copy directory from a jar file

Thanks for the solution! For others, the following doesn’t make use of the auxiliary classes (except for StringUtils) /I added extra information for this solution, check the end of the code, Zegor V/ public class FileUtils { public static boolean copyFile(final File toCopy, final File destFile) { try { return FileUtils.copyStream(new FileInputStream(toCopy), new FileOutputStream(destFile)); } … Read more

Gradle multiple jars from single source folder

I will post my working solution here as an answer (I’ve got a hint on gradle’s forum). The scopes in gradle are very strange thing 🙂 I thought that every task definition creates an object of some ‘Task’ class, which is something like ‘JarTask’ in this particular case. Then I can access any property of … Read more

How do I bundle a JRE into an EXE for a Java Application? Launch4j says “runtime is missing or corrupted.”

The only way I could bundle a JRE was to use Launch4J and Inno Setup Compiler. First, create a jre6 folder (for example) in the same directory as your output file (.exe). Then copy the JRE from your system into your jre6 folder. Then you open Launch4J and set the Bundled JRE path – just … Read more

JAR – extracting specific files

From the source: To extract only certain files from a jar file, supply their filenames: C:\Java> jar xf myFile.jar foo bar Using wildcards is a shell thing, and you should not expect it to work when extracting from a JAR file (which, as you’ve realized, is the case). What you can do, is supply a … Read more

Eclipse exported Runnable JAR not showing images

Works fine for me. Check what you may have different. Example 1: (resources in src) Steps: File Structure Code package com.stackoverflow.test; import java.net.URL; import javax.swing.*; // Wild carded for brevity. // Actual code imports single classes public class Main { public static void main(String[] args) { SwingUtilities.invokeLater(new Runnable(){ public void run() { URL url = … Read more