Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

1. Create minimal JVM and runtime with GUI primitives and compile it into .EXE

2. Create packager that concats class files (in JAR) of your application with that EXE.

3. Sign the exe. That's your monolithic application without external dependencies.

Done. You can distribute your Java applications without any need for JRE, WebStart or anything like that.

Did that once as J-SMILE (https://terrainformatica.com/org/j-smile/) project.

That minimal JVM was of size 300 kb so nothing if to compare with the rest of .class files of your app. So Java executables can be in principle smaller than comparable Go's executables.



That sounds far from trivial. Now in addition to your application you also have to maintain your minimal JVM to keep up with the latest developments in the mainstream ones.


I mean it’s not that much more complicated than webpack. You don’t actually have to create your own minimal JVM. But “take the JVM source, remove a bunch of stuff, and then compile” is pretty pedestrian as far as carrying patches for your dependencies goes. There are shops that are running their own modified kernels in prod.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: