Java 10 is here!
© Shutterstock / Rafalsky
Java SE 10 (JDK 10) is here but that’s not the only reason to celebrate: this is also the first release in Oracle’s new six-month cycle. Let’s have a look at the highlights.
A new era has begun! Java SE 10 (JDK 10) is the first release in Oracle’s new six-month cycle.
You can download Java 10 here.
Java 10 highlights
Despite the fact that Java 9 was released (only!) six months ago, which means the expectations for Java 10 might not have been too high, this release is likely to take you aback. Why? Because as Simon Ritter wrote in a recent article, there are a lot of new features in it.
Some key features included in the new release:
- Local-variable type inference: enhances the Java language to extend type inference to declarations of local variables with initializers.
- Parallel Full GC for G1: improves G1 worst-case latencies by making the full GC parallel.
- Application Class-Data Sharing: optimizes startup time and footprint by extending the existing Class-Data Sharing (“CDS”) feature to allow application classes to be placed in the shared archive.
- Experimental Java-Based JIT Compiler: enables the Java-based JIT compiler, Graal, to be used as an experimental JIT compiler on the Linux/x64 platform
— Mark Reinhold (@mreinhold) March 20, 2018
- (JEP 286) Local-Variable Type Inference: Enhances the Java Language to extend type inference to declarations of local variables with initializers. It introduces var to Java, something that is common in other languages.
- (JEP 296) Consolidate the JDK Forest into a Single Repository: Combine the numerous repositories of the JDK forest into a single repository in order to simplify and streamline development.
- (JEP 204) Garage Collector Interface: Improves the source code isolation of different garbage collectors by introducing a clean garbage collector (GC) interface.
- (JEP 307) Parallel Full GC for G1: Improves G1 worst-case latencies by making the full GC parallel.
- (JEP 301) Application Data-Class Sharing: To improve startup and footprint, this JEP extends the existing Class-Data Sharing (“CDS”) feature to allow application classes to be placed in the shared archive.
- (JEP 312) Thread-Local Handshakes: Introduce a way to execute a callback on threads without performing a global VM safepoint. Makes it both possible and cheap to stop individual threads and not just all threads or none.
- (JEP 313) Remove the Native-Header Generator Tool: Remove the javah tool from the JDK since it has been superseded by superior functionality in javac.
- (JEP 314) Additional Unicode Language-Tag Extensions: Enhances java.util.Locale and related APIs to implement additional Unicode extensions of BCP 47 language tags.
- (JEP 316) Heap Allocation on Alternative Memory Devices: Enables the HotSpot VM to allocate the Java object heap on an alternative memory device, such as an NV-DIMM, specified by the user.
- (JEP 317) Experimental Java-Based JIT Compiler: Enables the Java-based JIT compiler, Graal, to be used as an experimental JIT compiler on the Linux/x64 platform.
- (JEP 319) Root Certificates: Provides a default set of root Certification Authority (CA) certificates in the JDK.
- (JEP 322) Time-Based Release Versioning: Revises the version-string scheme of the Java SE Platform and the JDK, and related versioning information, for present and future time-based release models.
Java 10 wishlist: What came true and what didn’t
Last year, we talked to 11 Java influencers about their wishlist for Java 10 so now it’s time to see if their wishes were granted.
I would like to see Local-Variable Type Inference. For a long time, I was one of those long-term Java programmers who didn’t care about all the boilerplate because it becomes invisible to you over time. But the more reduction in boilerplate we get (e.g. lambda expressions, method references, and the new Collections factory methods) the more I realize that a language can be succinct without losing all meaning.
From a performance point of view, I would really like to see something along the lines of Value Types. I know there’s some discussion about what to do, how to do it, and what purpose it serves, but I think these discussions are really important, and that something like this can move Java even further forward in terms of performance.
— Trisha Gee
I am waiting for project Valhalla. It will really change the way we write Java.
— Baruch Sadogursky
I’m really excited about everything that is planned in Project Valhalla. Value types will be for sure the most relevant improvement, and generic specialization will allow users to avoid tons of unnecessary boxing/unboxing operations that are very time-consuming. Probably the usefulness of reified generics will be a bit more limited, but they will help a lot of programmers like me who work on the development of frameworks and libraries that in general require a heavier use of reflections.
— Mario Fusco
Speaking of Java influencers, we launched a brand new interview series in honor of the Java 10 release. Here is the first part.
Now the question remains: Who will migrate to Java 10 and when? Let’s hope history doesn’t repeat itself because, according to the preliminary results of our recent poll —which is still open!—, most people are still using Java 8.
Then again, the results of last year’s survey showed that Java 9 was a top priority for our readers —62 percent wanted to give Java 9 a try in 2018 and only one in five respondents found it uninteresting. More importantly, about one-third of the respondents were interested in experimenting with Java 10 & 11 so it remains to be seen if Java 10 is more like Java 8 or perhaps it inherits Java 9’s appeal.