4 ms·
You can also build a fat jar, which is basically a zip file containing everything but that the JVM knows how to load. All the static assets can go in there, too
by madhadron 5y ago
You can also build a fat jar, which is basically a zip file containing everything but that the JVM knows how to load. All the static assets can go in there, too. It saves you the build.sh.
- regularfry 5y agoI thought recent JDKs had the tools to build executable jars with the JVM built in. Can't find a reference now, though.
- kondu 5y agoPerhaps you're talking about jpackage - https://openjdk.java.net/jeps/392 https://openjdk.java.net/jeps/392
- regularfry 5y agoThat sounds close, but I thought you got a plain executable out rather than an installer.
- twic 5y agoThe build.sh is how CI builds the project from source. I suppose you meant that it saves the run.sh - but it doesn't, because you still have to give the path to the JDK, and any JVM command line arguments you want. Honestly, i've never really got the point of fat jars. Fat jars come with all sorts of annoyances (what do you do with the manifests from each jar?). Unpacking a zip is not hard.