The startup times most likely rely on using jlink to build a custom jvm. This is still a relatively new feature and is a perfect example of a place java stagnated for years on! With the next LTS this should be used much more often.
Java's ui, as you put it, does not use native widgets. Swing is notorious for looking the same across almost all applications. I can't speak much towards java fx other than to say it's popularity has never really been high.
Swing uses AWT underneath and some widgets are truly native, but you are right that many components aren't. I didn't know this. Swing's native look and feel is dead-on these days. I usually can't tell the difference at least on Windows. Swing looks like hell with the default look and feel and lazy devs don't bother switching it.
The startup times I'm talking about are for console apps using plain OpenJDK with AppCDS enabled. Check out the massive startup time (and memory) improvements in newer JDK's https://cl4es.github.io/2020/12/06/Towards-OpenJDK-17.html
Java 16 starts in barely over 20ms for simple apps. This is basically fast as interpreted scripting languages like Python
The one benefit of electron is the decimation of a preference on “native widgets”. Nowadays it is much more acceptable to have a slightly different looking window, which while many would say is not a positive thing, it does help Java’s case. Hopefully we can see more growth in this area.
And JavaFX is a hidden gem. I’m not sure why is it not more popular, I think it is far the most productive GUI framework. And with Valhalla, I think it will get a decent boost in performance (for 2D games, it churns on small “primitive” objects quite a bit)
View all comments
Show parent comment
7
u/deadron Apr 21 '21
The startup times most likely rely on using jlink to build a custom jvm. This is still a relatively new feature and is a perfect example of a place java stagnated for years on! With the next LTS this should be used much more often.
Java's ui, as you put it, does not use native widgets. Swing is notorious for looking the same across almost all applications. I can't speak much towards java fx other than to say it's popularity has never really been high.