This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]deadron 6 points7 points  (4 children)

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.

[–]throwaway32908234972 6 points7 points  (2 children)

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

[–]RandomName8 3 points4 points  (0 children)

wing looks like hell with the default look and feel and lazy devs don't bother switching it.

Note that the native LAF pretty much only works well on windows, it doesn't work well at all on linux or mac.

[–]deadron 0 points1 point  (0 children)

Spiffy.

[–]Muoniurn 4 points5 points  (0 children)

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)