News for hackers. Stuff that matters.
Re:Which version of JDK should I use? by DarkmSparks on Sunday October 10, 2021 @03:05PM (#28821037)
There is more to this now tho, because even their topline recommendation misses the fact that Temurin (anagram of runtime) only provides a small subset of tested builds you need.

They are in there but easy to miss - Bellsoft actually have builds for both jdks and jres for more than mainstream x86_64. Termurin dont even have jres anymore (last time I checked)

https://bell-sw.com/pages/downloads/#/java-17-current

Re:Which version of JDK should I use? by krzyk on Sunday October 10, 2021 @04:23PM (#28821643)
Are JREs still a thing (they were removed from Oracle builds in JDK 9)? Those were mostly for applets or JWS.

Nowadays no one keeps just one JRE in their laptop/desktop and disk sizes are in TBs so no point in saving 100 MB and lacking development tools.

And in one targets containers or systems with small amount of disk jlink give more gains than JRE.

Re:Which version of JDK should I use? by cbm-vic-20 on Sunday October 10, 2021 @09:12PM (#28823534)
JREs have basically been replaced with building custom executables via jlink. It basically includes a barebones JVM with only the modules that you need. You no longer have to either distribute or ask your users to download a JRE that includes the kitchen sink, you instead use jlink to create a custom distribution that only includes the modules that your code actually uses. For example, if your application does not use Swing, jlink won't include it.
Re:Which version of JDK should I use? by DarkmSparks on Sunday October 10, 2021 @04:59PM (#28821926)
If you are distributing software based on java a 40mb jre in place of a 400mb jdk is surely preferred. You can build them yourself for each OS you target with jlink, or you can just grab the latest built and tested one from e.g. Bellsoft - but not Adoptium or Oracle.

Java has been "breaking changes" between releases to make python blush for a few years now, 17 finally looks like a worthy migration from 8.

Re:Which version of JDK should I use? by krzyk on Monday October 11, 2021 @12:42AM (#28824733)
JRE is like 44MB, JDK is 190MB. Difference is not 400 MB. And you get jshell, javac all the nice tools that I missed when some wise guys in distro or corp decided JRE is enough.
Re:Which version of JDK should I use? by DarkmSparks on Monday October 11, 2021 @04:24AM (#28826048)
not when extracted they arent. And jlink wont help you get a jdk for 32bit arm
Re:Which version of JDK should I use? by krzyk on Monday October 11, 2021 @04:39AM (#28826145)
Extraced:

    323M    jdk

    136M    jre
Still, not 400 MB difference.

If you want jdk you don't use jlink.

Re:Which version of JDK should I use? by DarkmSparks on Monday October 11, 2021 @09:28AM (#28828067)
>Still, not 400 MB difference.

didn't say it was? A java.base jre is about 40mb extracted jdks extract to about 400mb (depending on os/arch)

A downloaded then extracted jdk will take over 500mb of disk space

Re:Which version of JDK should I use? by jamesfinlayson on Sunday October 10, 2021 @08:34PM (#28823295)
Officially at least it seems that there are no post Java 8 JREs (or maybe Java 11 - I don't remember exactly) which is a shame. I know I can do it myself but having a small off the shelf runtime sure was convenient.
Re:Which version of JDK should I use? by DarkmSparks on Monday October 11, 2021 @04:26AM (#28826058)
there is no "officially" anymore, java has gone open source with distributors kinda like linux distributions. adoptium isn't the best distribution if you want to run on more than win/lin/mac x86_64.