Earlier quoted context omitted.
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.
Which version of JDK should I use?
211–220 of 258 posts
Re: Which version of JDK should I use?
#212Earlier quoted context omitted.
Yes - .NET 5 and 6 both have runtimes and SDKs available for Mac and Linux. At least in my opinion, Linux is the preferred deployment platform for it now unless you have a specific (usually older) library that only works on Windows.
.NET 5 finally delivered Linux support but only eleven months ago, so I would test it some before betting the farm.
Re: Which version of JDK should I use?
#213Earlier quoted context omitted.
Why should I stick to LTS? All other versions aren't in any way less tested, you should always stick to the newest released JDK version, be it LTS or not, this way you get all the benefits (language features, performance gains) and security ones (security fixes always first land in the newest version, and are backported to the older ones). Upgrades now are pretty straightforward if you are past JKD 9 - with JDK 16-17…
> (language features, performance gains) There haven't been any notable language features added since java 9 besides some basic syntax sugar (which is already covered by stuff like lombok anyway). For features and performance you might as well just target .NET 6. It has things that have been perpetually 'too hard to implement' (read: oracle doesn't want to pay their engineers to impl it and will sue you if you do it…
Also, Oracle does pay plenty for the development of Java, and is a (surprisingly) good steward of the language, let’s drop all the blind hate.
And both in terms of GC and JIT, the JVM ecosystem is ahead, the reason they can be so head-to-head is that the CLR doesn’t hide lower level controls all that much, allowing for better hand-tuned programs (at the price of the resulting code not getting “automatically” faster in a possible future release)
Re: Which version of JDK should I use?
#214Earlier quoted context omitted.
Records, switch expressions, multi line strings and that is only language changes. You could call `+` syntatic sugar, just like anything past assembler being that.
> Records, switch expressions, multi line strings and that is only language changes. None of those are features, they were desperately needed shorthands for common java idioms. This is like calling braceless if/for/while statements 'features', when they're purely syntax sugar that has fallen out of favor completely because there's been several major security vulns found in major projects due to their use and developm…
Thank God they didn't shove this crap in. When Loom ships (I believe the next LTS is their target, more or less), JVM will have the same concurrency story as Go does, without blue/green function split like in C#.
Re: Which version of JDK should I use?
#215Earlier quoted context omitted.
Cool, but did they had 16? Or will they have 18? I use the newest Java version available.
In most environments it's better to use a LTS version
LTS is associated not with version number but with vendor that provides JDK. So if you don't pay any vendor then you don't have LTS, you just have a number and hope it is in some way better thant any other number - which is not.
OpenJDK has no notion of LTS, they release new versions every 6 months, vendors decide which one of those will be supported with fixes, e.g. Azul decided that their JDK 13 and JDK 15 will be supported with fixes for longer their JDK 12 and 14.
Re: Which version of JDK should I use?
#216Earlier quoted context omitted.
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.
not when extracted they arent. And jlink wont help you get a jdk for 32bit arm
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?
#217Earlier quoted context omitted.
Why should I stick to LTS? All other versions aren't in any way less tested, you should always stick to the newest released JDK version, be it LTS or not, this way you get all the benefits (language features, performance gains) and security ones (security fixes always first land in the newest version, and are backported to the older ones). Upgrades now are pretty straightforward if you are past JKD 9 - with JDK 16-17…
LTS = long term support Support for vulnerability patches, stability, and so on. You can automatically update and maybe that goes well and maybe problems are caught in testing. Regardless those events and changes have over time have increased costs. LTS should mean lower costs both through increased support focus, increased population of active users, and reduced forced change. You're not wrong...
And many companies are cheap and don't buy - hence using JDK 17 won't give you LTS, buying support gives you LTS.
Re: Which version of JDK should I use?
#218Earlier quoted context omitted.
Records, switch expressions, multi line strings and that is only language changes. You could call `+` syntatic sugar, just like anything past assembler being that.
> Records, switch expressions, multi line strings and that is only language changes. None of those are features, they were desperately needed shorthands for common java idioms. This is like calling braceless if/for/while statements 'features', when they're purely syntax sugar that has fallen out of favor completely because there's been several major security vulns found in major projects due to their use and developm…
Not too comfortable to use functions that will compile to efficient byte code exists for them, but with the definitely coming Valhalla, it will be trivial to create a custom primitive class for unsigned ints.
> async/await
With project Loom, it will avoid the mistake of function coloring that async introduces. In a managed language, why not let the runtime automatically transform blocking calls to non-blocking, when it already knows what’s up?
Re: Which version of JDK should I use?
#219Earlier quoted context omitted.
More like stagnation.
I mean, yes, there were fewer major features, but there were feature releases in those minor updates; there's nothing wrong with having stable software. Are you also one of those people who complain that stable Debian and RHEL releases include old software? Not everyone wants to live on the bleeding edge, and Java was a heavily enterprise ecosystem (for better and worse:]).
Re: Which version of JDK should I use?
#220Earlier quoted context omitted.
Isn't that kind of thing you'd expect using Gradle? It's not the first time it happened, they have been late to the party for a lot of the recent releases.
I guess it serves right to folks who endlessly hated Maven and liked this "new", "next generation" , "modern" build system with no XML. Turns out as long as JDK-8 is supported version of Java a lot of tools like this look modern.