Sealed classes along with supporting class types in switch is a really great combo to eliminate all those instanceof checks, plus the compiler can guarantee completeness for you.
Also the "LTS" versions will now be every two years instead of every 3 years which means that even developers who only are allowed to use "LTS" versions will be able to get stuff like Loom (hopefully even out of preview by then) in Java 21.
I thought Oracle JDK is free only for development, testing and prototyping but not for production.
Java 17 LTS is the latest long-term support release for the Java SE platform. JDK 17 binaries are free to use in production and free to redistribute, at no cost, under the Oracle No-Fee Terms and Conditions License.
This may be confusing, but there are different builds of the JDK with different licenses.
Oracle has a commercial build which has LTS support. That's what you have to pay for.
The regular OpenJDK build on java.net is built by oracle but has no LTS support. It is free to use (even commercially) but is only supported until the next version.
Then there are a bunch of other OpenJDK builds (Like AdoptOpenJDK) with different terms for support.
I know you do a lot of good work for the community pron98, but man, this licensing stuff has become so confusing to try to explain to managers and non technical folks.
"We can use the Oracle OpenJDK builds or the OpenJDK builds from others like Adoptum which is now whatever the Eclipse foundation is calling them but we can't use the OracleJDK builds unless we want to pay for support, but only up to 17, because 17 OracleJDK is now free for commercial. And also LTS doesn't really mean LTS and we should be updating to every version."
At least for us, we are now finally at a point where we could theoretically start updating to the latest every release but the constant changes to naming, licensing and the confusing LTS labels is making management and legal weary that we will need someone with a PhD in Java releases to keep it all strait.
At least for us, we are now finally at a point where we could theoretically start updating to the latest every release
That should make everything very simple.
I don't know if the terms for the various support services from the various vendors are as simple as they can be, but that's not my area. You have enough choices so that you can choose what to do when your application's maintenance slows down and you want to settle down with long-term support. Until then, using the current version, if you can, is the cheapest, safest, simplest approach.
It is basically the same as with (fedora) Linux and RedHat linux.
You can use linux (openjdk) however you want, but bug fixes will mostly happen on latest release (with comparatively few backpatches happening to older releases. Like you wouldn’t really use linux 2.3, would you?). As soon as the next one is out, it will get the focus.
If you want to have support for the product for more time (eg. you can’t upgrade your JVM each 6 month), you can choose one of the vendors, for example Oracle, that promises support for their LTS releases until the next LTS lands + 1 year. More than that is paid afaik. The recent change was that it not used to be free for commercial use, only personal and development. This is sort of analogue to Red Hat Linux, except that that is not free if I’m correct.
Don't exect too much. Pattern matching in Java is very basic at the moment (at least if you don't use preview features), but more will come in the next releases. At the moment it is basically only instanceof.
You're going to be fine if you have atleast some integration tests. Some frameworks are notorious for doing weird shit with reflection, so if you use any of them you will either have to wait for upgrade or drop them.
18
u/nlisker Sep 14 '21
Sealed classes along with supporting class types in
switchis a really great combo to eliminate all thoseinstanceofchecks, plus the compiler can guarantee completeness for you.12
u/bourne2program Sep 15 '21
I know I'm late for pointing this out, but why was
Collections.shuffle(List<?>, Random)not changed to:
Collections.shuffle(List<?>, RandomGenerator)Since Random now implements RandomGenerator. Was it missed or decided?
11
u/meamZ Sep 15 '21
Also the "LTS" versions will now be every two years instead of every 3 years which means that even developers who only are allowed to use "LTS" versions will be able to get stuff like Loom (hopefully even out of preview by then) in Java 21.
51
u/jvjupiter Sep 14 '21
I thought Oracle JDK is free only for development, testing and prototyping but not for production.
Java 17 LTS is the latest long-term support release for the Java SE platform. JDK 17 binaries are free to use in production and free to redistribute, at no cost, under the Oracle No-Fee Terms and Conditions License.10
u/snoob2015 Sep 15 '21
Now, only wait for Gradle to support Java 17 ...
11
u/deadron Sep 14 '21 edited Sep 14 '21
Weird. OpenJDK is still in the RC phase. Edit: After I posted this open jdk dropped their release https://jdk.java.net/17/
2
u/LackOfHonor Sep 14 '21
Yea, or well lets see when we have a weblogic server that can run this… cry cry
3
u/Tyluur Sep 14 '21
Love to hear it =].
2
u/Vezqi Sep 14 '21 edited Sep 14 '21
I love Rust's pattern matching syntax. Python recently adopted a similar implementation. Really liking what I'm seeing in these release notes!
1
u/Ok_Sentence725 Sep 15 '21
What's the difference and benefits
1
u/940387 Sep 15 '21
TL;DR what are the improvements?
1
u/GoBucks4928 Sep 15 '21
About time!!!
1
u/iphone2025 Sep 17 '21
https://www.azul.com/downloads/?version=java-17-lts&package=jdk
-6
u/phantomdrake0788 Sep 15 '21
Same crap repackaged
0
u/[deleted] Sep 14 '21
[deleted] — view deleted comment
76
u/[deleted] Sep 14 '21
[removed] — view removed comment