r/programming • • Oct 21 '17

Using Java 9 Modularization to Ship Zero-Dependency Native Apps

https://steveperkins.com/using-java-9-modularization-to-ship-zero-dependency-native-apps#.Wes5IMWbUWE.reddit
310 Upvotes

109 comments sorted by

View all comments

29

u/mcguire Oct 21 '17
cli 21.7 MB

For comparison, the full JRE on this platform is 203 megabytes.

A “Hello World” CLI written in Go compiles to around 2 MB. 

As an aside, "hello world" in C or another true-native language using the system's standard C library is a few KB.

32

u/pjmlp Oct 21 '17

Only when dynamically linked.

31

u/TexasCrowbarMassacre Oct 21 '17

A statically linked "hello world" is around 20KB using musl. Using glibc brings it to 700KB.

7

u/[deleted] Oct 21 '17

Have some karma for mentioning musl!