-
I have successfully ported my desktop application from Dagger/Spring to Micronaut/Spring (there's just way too much Spring code in there for me to be able strip it all out in a timely manner). Using Micronaut and PicoCLI everything is working beautifully in Eclipse/Gradle. It's launching, tests are passing, so now I want to do a build and install it to make sure that everything will work for our customer. Our build (via Gradle) uses Shadow (com.github.johnrengelman.shadow) to combine our application with all of its dependencies into a single Jar file. I've checked and all expected dependencies appear to be present, and from the look of it the generated Micronaut classes are also present in the shadow jar. We then use Launch4J to make this shadow jar executable. From everything that I can tell, the output from Launch4J looks to be correct, however when I try to run it the splash screen appears for a fraction of a second and that's it. When I run the Launch4J generated executable as a jar file, I get the following:
The Launch4J debug information I've been able to collect all looks correct (other than an Exit Code of 1), and all of my attempts at digging into this have proven to be fruitless thus far. I gather that the most common causes of this error are invalid MANIFEST.MD in the jar (I've checked and it's identical to the original pre-Micronaut manifest), or issues with the classpath (the shadow jar should contain all of the required dependencies, and no other classpath references are used as far as I can tell). The relevant portions of the build.gradle are as follows:
None of which has been changed since pre-Micronaut. Is Micronaut compatible with Launch4J? Is there something special that needs to be done/added that I'm missing here? Has there been any attempt or success using Micronaut with Launch4J? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I've finally figured out the problem, and posting the answer here to help any who may be interested. The issue turned out to have nothing to do with Micronaut or compatibility issues between Micronaut and Launch4j, but rather a seeming limitation within Launch4j when working with jar files that contain too many files. The migration to Micronaut pushed the number of files beyond the 32-bit jar limit of 65535, necessitating adding the My solution is to turn on the
|
Beta Was this translation helpful? Give feedback.
I've finally figured out the problem, and posting the answer here to help any who may be interested. The issue turned out to have nothing to do with Micronaut or compatibility issues between Micronaut and Launch4j, but rather a seeming limitation within Launch4j when working with jar files that contain too many files. The migration to Micronaut pushed the number of files beyond the 32-bit jar limit of 65535, necessitating adding the
zip64 true
flag as seen above. However, once that limit is passed Launch4j breaks, and I wasn't able to find any means of settings an equivalentzip64
flag on it. In fact I found virtually no information in terms of Launch4j file count limitations (so the limi…