2 ms·
I wish they would make it produce single statically linked file. Golang is so awesome in that regard. Should not be hard: embed JRE and append jar stuff into th
by vbezhenar 2y ago
I wish they would make it produce single statically linked file. Golang is so awesome in that regard. Should not be hard: embed JRE and append jar stuff into the end, write special classloader for this format and that's about it.
Right now it produces directory similar to JRE itself, so makes little sense to me, nobody cares about directory size, but single file ergonomics is a real deal.
- neonsunset 2y agoThat’s how .NET’s single-file publish works (one of its modes).
- pjmlp 2y agoYou want GraalVM, OpenJ9 for that. Additionally there is jpackage.
- vbezhenar 2y agoGraalVM is very different league. It actually compiles Java application into native code, which takes enormous amount of RAM and processing time. Also it requires adapting application, because it's not a compliant JVM. What I mean is just packaging JVM and related jars into a single runnable artifact which is much simpler task.
- alex_suzuki 2y agoYou can use jlink‘s output image as the input for jpackage: https://docs.oracle.com/en/java/javase/17/docs/specs/man/jpackage.html https://docs.oracle.com/en/java/javase/17/docs/specs/man/jpa...
- vips7L 2y agoDoens't jpackage still just make installers and not a single binary you can just run?
- vips7L 2y agoThey are working on this with Project Leyden. https://cr.openjdk.org/~jiangli/hermetic_java.pdf https://cr.openjdk.org/~jiangli/hermetic_java.pdf