Hi there,
Now a days Oracle has changed the released strategy for JDK. As of now JDK major version come out every 2 years or so and sometimes it took a longer period also. Now it has been changed and we no longer have a java road map that calls out which feature will come out in next release. Its now feature based release every 6 months.
Oracle decides to commercialized JDK and hence now there are 2 flavors
– OpenJDK
– Oracle JDK being this a super-set ( having some features now onwards are chargeable ex. FlightRecorder and MissionControl, application class data sharing)
Lets have a look how JDK released from version 9
- JDK 9 released in September 2017
- JDK 10 released in March 2018
- JDK 11 released September 2018 (with TLS 1.3 and Http 2.0)
- JDK 12 expected in March 2019
Suppose you plan to move from JDK 8 or 9 to JDK 11. How one can be sure that application won’t break in latest released ? Is some specific dependencies or API has support after migration to specific version of JDK ?
To address this concerns Oracle came with some useful tools as part of releases, I highlighted some of them below
- jdeps : use the jdeps command to launch the Java class dependency analyzer. It figure out package-level or class-level dependencies of Java class file. Introduced in JDK 8.
- jdeprscan: use the jdeprscan tool as a static analysis tool that scans a jar file (or aggregation of class files) for uses of deprecated API elements. –-for-removal : Limits scanning or listing to API’s that are deprecated for removal. Introduced in JDK 9.
Incubator modules: Incubator modules means of putting non-final APIs in hand of developers while the APIs progress towards either finalization or removal in future release like http2.0 introduced as incubator in JDK 9 but available as GA in JDK 11.
Preview Language and VM feature: till now we talked about API but what about language or VM feature. Is new feature of Java SE platform that is fully specified, fully implemented and yet impermanent. JDK 12 has 2 preview feature targeted
–enabled-preview
–release $<jdk-version>
What’s Next: open JDk has some interesting project and work is going on to make them part of future JDK releases, some of projects are
Project Portola : committed to having Java remain the first choice in world of containers and deployment. Specific targeted for Alpine linux, a flavour of linux for widely used in containers.
Project Valhalla : Goal is to have performance of primitive and flexibility of a class. (but lacking the functionality of mutable classes)
ex. value class Point { int x, int y}
Project Panama: Goal is to target calling of foreign function (language) and data, access low level functionality and Big Data, Machine Learning.
Possible replacement of JNI.
Project Loom: Goal to make “Fibers (lightweight threads)”. Making blocking calls virtually free leads to better Threading model.
Project Amber: targated for day to day language improvements like
- Dynamic class-file constants ( already part of JDK 11)
- Raw string literals
Example: Before:
String html = “<html>\n”+
“<body> hello\n”+
“</body>\n”+
“</html>\n”
After: String html = `<html>
<body> hello
</body>
</html>`;
3. Switch Expression: new simplified way to write switch as follows
int numLetters = switch(day){
case MONDAY,FRIDAY,SUNDAY -> 6;
case TUESDAY -> 7;
case THURSDAY, SATURDAY -> 8;
case WEDNESDAY -> 9;
};
Check the current release and early access to those projects or features at http://jdk.java.net/
Hope this blog page clears some of insights in JAVA future releases and ecosystem.
Good introduction about upcoming releases. Good work!!
LikeLike
Good contents
LikeLike