The example in question is very much a "include-more-than-you-need-by-default" problem. So, bloat.
Java lets you include only the parts of the JDK that you need for your app. These parts are called modules.
Unfortunately, all modules MUST include the base module (java.base), which is ~22MB. And if you add a GUI (java.desktop), that's another ~13MB. And since the linked example uses Java FX, there is yet another layer on top of that.
Java is doing a lot of work to bring that number down by a lot. More to come.