4 ms·
The JDK now supports building standalone executables. https://docs.oracle.com/javase/9/tools/javapackager.htm#JSWOR719 https://docs.oracle.com/javase/9/tools/j
by joshmarinacci 2y ago
The JDK now supports building standalone executables.
https://docs.oracle.com/javase/9/tools/javapackager.htm#JSWOR719 https://docs.oracle.com/javase/9/tools/javapackager.htm#JSWO...
- silver_silver 2y agoWould this generate ~150mb images like the similarly-named jpackage or is it possible to trim down the runtime?
- deepsun 2y agoYes, but Electron apps are about the same size: (Slack: 120MB, 1password: 136MB, Discord: 103MB). But it was a problem in dial-up times, so maybe JavaFX appeared too early, when 150MB was not ok. And Python runtime is about 20MB, but it's kinda assumed it's already installed (who knows which version though, for Python it's important, not so much with Java). Maybe Sun also expected their target audience to eventually have a JRE already installed on end-user machines.
- holoduke 2y agoProblem is that the entire runtime is packaged. Nice for large enterprise solutions, but not for small apps. And if I remember correctly the memory footprint isn't nice either.
- microflash 2y agoYou can trim down the runtime[1] but the tooling around doing this is non-existent / unreliable. Alternatively, you can generate native binaries with GraalVM[2] which comes with its own baggage (license, slow compile time, etc). [1]: https://docs.oracle.com/javase/8/embedded/develop-apps-platforms/custom-jre.htm https://docs.oracle.com/javase/8/embedded/develop-apps-platf... [2]: https://www.graalvm.org/ https://www.graalvm.org/
- deepsun 2y agoBut most popular modern desktop apps also bring the whole runtime packaged, just not Java (Node.js / Chromium) (Slack: 120MB, 1password: 136MB, Discord: 103MB). So I don't see much a difference actually. 30MB is not a lot anymore, not for network, not for disk.