r/java • • Jan 02 '25

How Java's Executable Assembly Jars Work

https://mill-build.org/blog/5-executable-jars.html
64 Upvotes

42 comments sorted by

View all comments

Show parent comment

1

u/orxT1000 Jan 03 '25

But jpackage "only" generates a Setup.exe (or .msi installer) and requires 3rd party build tools. (InnoSetup/WiX-Toolset)

Plus you need to have the jlink/jdeps stuff working before that step.
This breaks newcomers usually, when they are happy having it running in IntelliJ. When they want to show somebody and ask "how to generate an exe" they are told to use maven in the first place. (grallvm and uber.jar is also possible, making the situation even more complex ...)

1

u/BinaryRockStar Jan 03 '25

Tell me about it, I recently went through exactly this series of painful steps and never got it working perfectly right. Having to build on a particular platform to make a build for that platform is just the cherry on top and was a jawdropping moment when I found out.