3 ms·
Jars are also just zip files, so you can prepend a shell script without impacting the ability for Java/zip to decompress. Add a shell script to run Java on its
by Xorlev 9y ago
Jars are also just zip files, so you can prepend a shell script without impacting the ability for Java/zip to decompress. Add a shell script to run Java on its self and you have a executable (though not a true native elf/mach binary).
It’s not much worse than a standard dynamically linked binary at that point. You just need a JVM on the system. Combined with the AOT compiler (as it stabilizes) makes Java applications more competitive with standard binaries.
- maemre 9y agoThe sbt module I'm using for creating JARs (sbt-assembly) has this feature and I really like how seamless it makes creating executable JARs. I used it in a couple cases to create artifacts/executables for research projects that can be easily run and without many dependencies, usually just a recent enough JVM.