That Java 9 feature would definitely be amazing. I agree, Swift is nowhere near the maturity of the Java ecosystem.
The linker part is described in these JavaONE 2016 talks
https://www.youtube.com/channel/UCdDhYMT2USoLdh4SZIsu_1g/sea...
Thanks for that. Are you aware of any numbers on the size savings you get for a typical app using jlink?
No, as I am yet to play with it.
So far I only seen the presentations.
But looking at Java 8 on this PC I would say:
jvm.dll (8 MB) + main.exe (200 KB) + trimmed down JRE
Also notice that from the presentations they have some experimental support for jlink plugins, which can further shrink down the size.
This could have made Java actually relevant on the desktop, ignoring for a second how clueless Sun was about doing good desktop libraries.
However with Java 9 you will be able to use the new Java linker and create you own little VM + AOT startup code.
So that coupled with the large Java eco-system is already good enough for many of us.
Swift does compile to AOT today, but the tooling and libraries outside Apple platforms is almost insignificant, and only good enough for startups willing to bet on it.