Live data from Hacker News

Which version of JDK should I use?

whichjdk.com

171–180 of 258 posts

Re: Which version of JDK should I use?

#171
post #129

Earlier quoted context omitted.

> read: oracle doesn't want to pay their engineers to impl it and will sue you if you do it yourself) like value types, generics without type erasure, no checked exceptions, etc. All of this is currently being implemented in project Valhalla...

Valhalla isn't anywhere near complete and has been in development for 8+ years, C# had these features before valhalla was even planned.

But they ARE working on them and they ARE paying their engineeers to do it. They even hired pron to implement fibers in the jvm and didn’t sue him for doing it in quasar, which is the opposite of what you’re claiming.

Re: Which version of JDK should I use?

#172
post #171

Earlier quoted context omitted.

Valhalla isn't anywhere near complete and has been in development for 8+ years, C# had these features before valhalla was even planned.

But they ARE working on them and they ARE paying their engineeers to do it. They even hired pron to implement fibers in the jvm and didn’t sue him for doing it in quasar, which is the opposite of what you’re claiming.

[deleted]

Re: Which version of JDK should I use?

#173

Earlier quoted context omitted.

Oh, I have a fun one. The company I work at leverages Nashorn for running some user-customizable scripts and when upgrading from 8 to 11 we found out that Nashorn changed the way they express numbers under the hood. Basically, every number is either an integer or a float and it used to be that every number was a long or a float. This silently broke a bunch of scripts and callbacks because of class cast exceptions and…

> involving some pretty scary reflection stuff for some unexplained reason This is where it always seems to end up. Why do people bend over so far backwards doing reflection that isn't specified?

> Why do people bend over so far backwards doing reflection that isn't specified?

Either because there's no other way to do it, or because the official way is too slow.

Re: Which version of JDK should I use?

#174
post #49
post #47

Earlier quoted context omitted.

even if the gradle script is written in kotlin, wouldn't you face the issue with gradle regardless?

No, because Gradle isn't checking the JVM version, the Groovy runtime is. (Specifically, the Groovy compiler seems to run fine on the buildscript, producing a buildscript bytecode file; but then, upon load, the Groovy runtime seems to check that buildscript bytecode file's JVM bytecode version metadata before doing whatever-it-does when loading it.) Gradle itself isn't written in Groovy; it's 5% Java, 95% Kotlin. The…

> Gradle itself isn't written in Groovy; it's 5% Java, 95% Kotlin

This doesn't appear to be true just by looking at the Gradle GitHub repository. It claims that the code in the repo is 46% Groovy, 44% Java and 6% Kotlin

Re: Which version of JDK should I use?

#175
post #154
post #127

Earlier quoted context omitted.

It sounds like something Microsoft would come up with. Well, it's missing a "NT Azure Client Access License". Why didn't they just keep AdoptOpenJDK? That was a good name IMO.

From https://developer.ibm.com/announcements/adoptopenjdk-has-a-n... (Eclipse is sponsored by IBM)... > Along with the move to the Eclipse Foundation, the project has a new name: Eclipse Adoptium. The move and name change are being made to ensure vendor independence and long-term viability of the project. As you know, the Eclipse Foundation has a number of key projects, such as Jakarta EE, under its umbrella, with th…

Disclaimer: I am involved with the eclipse foundation (not as part of the core staff)

Hi, I just want to expand on this a bit...

The "eclipse foundation" is actually not just sponsored by IBM. Nor is the IDE. As for what support it provides, that's actually spot on and is under a similar idea to what apache and linux provide. There are of course differences: but for most people the vague idea that open source foundations exist and provide some similar functions as a way to host projects is enough for this discussion

A lot of eclipse's revenue actually comes from working groups with Jakarta EE being the biggest one. There are also IOT, Automotive and many other working groups + projects under the eclipse umbrella.

Re: Which version of JDK should I use?

#176
post #100

Earlier quoted context omitted.

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

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.

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?

#178

Earlier quoted context omitted.

Oh, I have a fun one. The company I work at leverages Nashorn for running some user-customizable scripts and when upgrading from 8 to 11 we found out that Nashorn changed the way they express numbers under the hood. Basically, every number is either an integer or a float and it used to be that every number was a long or a float. This silently broke a bunch of scripts and callbacks because of class cast exceptions and…

> involving some pretty scary reflection stuff for some unexplained reason This is where it always seems to end up. Why do people bend over so far backwards doing reflection that isn't specified?

From what I've seen: to add automagic functionality, syntactic sugar and wrapper methods for libraries. The JVM/Java language doesn't seem to have the tooling necessary to accomplish this natively, so it's the only reliable way to do it without relying on annotation processors having properly run (which still require some reflection magic, depending on the use case).

Re: Which version of JDK should I use?

#179
post #100

Earlier quoted context omitted.

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

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.

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.
Post reply on HN