Hacker News new | ask | show | jobs
by mike_hearn 18 days ago
Bundling a JDK with the app is the officially sanctioned way to ship Java apps since Java 9, so for over a decade now.
2 comments

You mean a JRE, because the whole JDK contains a bunch of things you're never going to need.

Mind you, a default JRE redistribution makes your app at least 100+MB. Using jdeps to strip out unneeded things is a good idea if you want it to get down to 25 ish MBs.

JREs haven't been a thing in like a decade I thought.
Yeah, saying JRE is a bit of a shortcut since you're supposed to jlink & jpackage & jdance &jpray to get a slimmed down JVM released with your app, but it's closer to what would be a JRE than a full JDK
The JDK is too big for every app to do that, imo.
Which is why there are linking and packaging tools for trimming fat that isn't needed, or even AOT compile the application.