Java Updates: 8 -> 17
Created by James

9-16 Not Free
OracleJDK
17+ Free for 1 year
Java Source Code
OpenJDK project
Java Distributions
Adoptium (formerly AdoptOpenJDK)
Free
Java Versioning
https://www.marcobehler.com/guides/a-guide-to-java-versions-and-features
https://dzone.com/articles/a-guide-to-java-versions-and-features
https://ondro.inginea.eu/index.php/new-features-in-java-versions-since-java-8/
Timeline

Post-2017
Long Term Support every 6th release (2 years)
Sporadic, Uplanned Releases
Pre-2017
Fewer Features Added Each Release
6 month releases
8
9
10
11
12
13
14
15
16
17
Improved try-with-resources
Project Jigsaw: Modules and Multi-Release Jar Files
Incubator Modules
Local-Variable Type Inference: var-keyword
var for Lambda
Current Ryota Version
Preview Features
JShell
Unicode 11 Support
Unicode 12.1 Support
Multiline Strings Preview Version
Multiline Strings Release Version
Sealed Classes Final Version
Additional Methods for Collections
Diamond Operator Extensions
Added ifPresentOrElse() for Optionals
New String methods
E.g.
isBlank()
lines()
.strip()
Run Source Files Without Compiling
A step towards scripting
Sealed Classes Preview Version
Sealed Classes Preview Updates
New Switch Expression Preview Version
Switch Expression Preview Updates
Switch Expression Final Version
Why Are Companies Stuck On 8?
There’s a mix of different reasons companies are still stuck with Java 8. To name a few:
- Build tools (Maven, Gradle etc.) and some libraries initially had bugs with versions Java versions > 8 and needed updates. Even today, with e.g. Java >=9, certain build tools print out "reflective access"-warnings when building Java projects, which simply "feels not ready", even though the builds are fine.
- Up until Java 8 you were pretty much using Oracle’s JDK builds and you did not have to care about licensing. Oracle changed the licensing scheme In 2019, though, which led the internet go crazy with a ton of articles saying "Java is not free anymore" - and a fair amount of confusion followed. This is however not really an issue, which you’ll learn about in the Java Distributions section of this guide.
- Some companies have policies to only use LTS versions and rely on their OS vendors to provide them these builds, which takes time.
To sum up: you have a mix of practical issues (upgrading your tools, libraries, frameworks) and political issues.
Private methods for Interfaces
New annotation type Serial
Pattern Matching for switch-statement Preview Version
Additional Methods for Stream API
Vector API Incubator Version
HTTPClient Incubator Version
HTTPClient Final Version
NullPointerException improvements
Foreign-Memory Access API Incubator Version
Records Preview Version
Records Final Version
Pattern Matching for instanceof Preview Version
Pattern Matching for instanceof Final Version