DevOps Zone is brought to you in partnership with:

Ben is a writer, editor, coffee addict, beer snob, and music lover living in Cary, NC. He first became interested in computer hardware at a young age, and has built more than his fair share of desktop PCs over the years. He's a total device junkie and welcomes the coming age of the Internet of Things. His interest has since spread to tech media in general—in particular he writes about cloud technologies, middleware, DevOps, IoT, and enterprise architecture. He's easy to get a hold of, especially on Twitter, where he keeps an active presence. Get in contact to discuss all things software, whatever your favorite beer is, interesting tech topics... really, just talk about anything. Benjamin is a DZone Zone Leader and has posted 116 posts at DZone. You can read more from them at their website. View Full User Profile

Java 9 Features Announced — What Do You Think?

08.20.2014
| 28013 views |
  • submit to reddit

A series of Java Enhancement Proposals (JEPs) has been published on OpenJDK concerning the next major update (Java 9). Previous rumors about Java 9 features haven't had very much weight, nor particularly interesting new features, but this new feature list is packed with developer favorites that the community has been requesting for many years. 

These features include:

  1. A light-weight JSON API — which is a source of great speculation right now about how truly useful this feature will be (as proposed by the community process).
  2. A HTTP 2 Client  — for HTTP 2.0 and websockets.
  3. Process API Improvements  — to improve the API for controlling and managing OS processes.
  4. Improved contended locking —for increasing performance between threads.
  5. Segmented Code Cache — to improved execution time for complicated benchmarks.
  6. Smart Java Compilation (Part 2) — Makes the sjavac tool available in the default JDK.
  7. Modular Source Code — organizes JDK source code into modules.

I'm sure plenty of you are looking pretty happy right about now. Many people have commented about how long the Java community has been waiting for a dedicated JSON API to clean up that whole mess—and performance improvements are always welcome here. The HTTP 2 client was some expected, but the updated sjavac compiler seems very interesting.


Hearing anything substantive about Java 9 this soon after Java 8 is a pretty big deal—and maybe (just maybe) JDK 9 could be on time this time, right? Well... I don't know about that. Certainly that's a lot of speculation about if Oracle will be able to meet their 2016 goal for Java 9, considering the huge delays they had with JDK 8. Sticking by the 2016 goal could mean only two years of development time, and that leaves plenty of people with very reasonable doubts.

Also, not to be tricked into satisfaction just yet, plenty of developers have expressed disappointment at what's been announced so far. A user named "refugee" on HackerNews said, "nothing pollutes java source more than getters and setters. I can't believe this still isn't being address. Wish they'd move in the direction Groovy has in this regard." His comment sparked a pretty involved discussion. Of course, comparisons to Groovy and Scala aren't entirely new criticisms.

We want to know what you think about the JDK 9 announcements! Are these features something you've been waiting for, or are very interested in exploring further? Are you somewhat underwhelmed by the slow leak of feature announcements? Do some of these proposals seem to go against improvements that you want? Comment below about how this announcement looks to you.

Comments

Hernâni Cerqueira replied on Tue, 2014/08/19 - 11:00am

 Java 8.1 at best. Not enough for a major release imho. That's a disapointing list of new features.

Branden Makana replied on Tue, 2014/08/19 - 1:38pm in response to: Hernâni Cerqueira

Color me unimpressed. Back to scala I guess..

Abani Behera replied on Wed, 2014/08/20 - 12:16am

modularity is the one to watch for

Daybreaker Gijane replied on Wed, 2014/08/20 - 2:24pm

Modular execution (a la OSGI) would be nice alongside module sourcecode.

JSON is a bit late to the party - Jackson and Gson already have their place.

Everything else seems incremental.

I'm holding out for Java X!

Aleksey Novik replied on Wed, 2014/08/20 - 5:25pm in response to: Hernâni Cerqueira

I think the main reason why it's a major release is that the whole JDK will be refactored for modularity using the new Jigsaw modules functionality. 

So the whole JDK will be based on modules that might or not be included in potentially different profiles (for example a Java ME equivalent?).

The whole new modularity mechanism is not just a different packaging, but at runtime something along the lines of OSGI, so it's a huge change that has already been under development since several years.  Once it's done, it will complete change the way the classpath is managed.

I think it's a good decision from Oracle to not include much more (compared to Jigsaw) in Java 9, given the huge scope of the Jigsaw change, which might probably be the change with the largest internal code impact so far ever done in Java, or at least one of the largest.


 

Venkata Rathnam... replied on Thu, 2014/08/21 - 1:18am

Not a major list of changes for application development point of view. 

Benjamin Ball replied on Thu, 2014/08/21 - 2:54pm in response to: Aleksey Novik

 Thanks for that Aleksey, I don't think it had quite sunk in with me just how much the modularity was going to impact the code and how far reaching those changes could be (as far as you mentioned with the possibility of different profiles like for Java ME). Certainly that's something that could justify a major release now that I think more about it. Is there anything else you're specifically hoping to see, or think we'll definitely hear about in the near future?

Olivier Allouch replied on Thu, 2014/08/21 - 5:42pm

2 things that suck: crappy installer without auto-update and poor hot swap (please Oracle buy JRebel so that the php kids shut up)

Aleksey Novik replied on Fri, 2014/08/22 - 3:25pm

Hello, I hope eventually Java receives support for helping prevent NullPointerExceptions at the level of the compiler, or implicit casts after instanceof tests (something like in the Ceylon language  from RedHat), also syntatic sugar for getters and setters.

These features would make a big difference in making the code more readable and help with everyday development work.

Apparently a large chunk of the Jigsaw modularising source code landed this week on the trunk, so it's seems we are on track for 2016 for a evolutionary release more on the lines of Java 7.


Behrang Saeedzadeh replied on Tue, 2014/08/26 - 7:16am in response to: Hernâni Cerqueira

This is only a subset of the features proposed for Java 9. 

Behrang Saeedzadeh replied on Tue, 2014/08/26 - 7:20am in response to: Olivier Allouch

There's already the JEP 159 for improving the hotswap: http://openjdk.java.net/jeps/159

That will make JRebel unnecessary for hot swapping classes.

However if I remember correctly, JRebel can do more than simple hot swaps. It has plugins for various frameworks that let you hot swap, for example, bean configs in a Spring app so that you don't have to restart your server when your bean configs change. But last time I used it was two or three years ago and for a very short period of time so I can't remember very well. :)

Behrang Saeedzadeh replied on Tue, 2014/08/26 - 7:25am

By the way, that GIF... what movie is that? :)

Benjamin Ball replied on Tue, 2014/08/26 - 2:25pm

The gif is from the movie Get Him to the Greek.

Olivier Allouch replied on Tue, 2014/08/26 - 4:19pm

Thx Behrang for the info !

Eric Holley replied on Wed, 2014/08/27 - 10:19am

 I must agree on the lack of graceful handling of getters/setters. That one issue was the driving force behind me switching to Groovy.

Arun Sharma replied on Wed, 2014/08/27 - 11:17am

I am looking for modular execution (more specifically OSGI) support.

Arun Sharma replied on Wed, 2014/08/27 - 11:22am


I am looking for modular execution (more specifically OSGI) support.

Arun Sharma replied on Wed, 2014/08/27 - 11:22am


Good to have modular execution (more specifically OSGI) support.

Olivier Allouch replied on Wed, 2014/08/27 - 11:23am in response to: Eric Holley

For getters/setters => project lombok

Sam Cirka replied on Wed, 2014/08/27 - 7:42pm

These all look great for whatI'm currently working on, and make sense as Java is the de facto RESTful server-side engine.

Behrang Saeedzadeh replied on Thu, 2014/08/28 - 8:21am in response to: Benjamin Ball

Thanks Benjamin!

Ken Taylor replied on Thu, 2014/08/28 - 4:13pm

Why did Sun, and now Oracle, abandon the desktop UI?  Swing has needed a re-write for many years.  I know that Sun had decided to replace Swing with JavaFX before selling to Oracle but that was a mistake in my opinion. JavaFX might be ok for the multimedia and entertainment industries but its not a good solution for desktop applications in general.  I think Oracle is cutting Java developers out of a lot of business by not developing any support for desktop UIs.  A large number of applications today are not web-based but traditional, and there will always be a need for them.

And then, of course, there is the irrational abandonment of Java Applets, which were a good solution for web applications, especially those that began as desktop apps.

Pranjal Mehta replied on Tue, 2014/09/02 - 5:40am

"modular execution" that's really good feature comes along with JAVA 9.

Stay tuned Guys, I'll be writing on "9 Questions You Need To Ask About Java 9"

As a reputed Java application development company, we are well-acquainted with following technologies-

  • JSP
  • J2EE
  • Java Beans
  • Oracle
  • Hibernate
  • MySQL
  • Netbeans
  • Eclipse
  • iText
  • XML/HTTP
  • JavaScript
  • Java Swing
  • Struts
  • Wireless Village
  • Tomcat

Eric Holley replied on Tue, 2014/09/02 - 10:15am in response to: Olivier Allouch

 Looked at Lombok early on. But, the all the advanced features of Groovy just sucked me in. I still use Java a lot (for Android programming.) But, I try to use Groovy whenever I can. I'm still mostly a Java programmer in a Groovy world though.

Firz Laz replied on Thu, 2014/09/04 - 12:16pm

That's quite a deceiving article heading. What you've highlighted is a minimal subset of planned JDK 9 features. The upcoming (and increasing) list of features is available to view on OpenJDK bug tracker:

https://bugs.openjdk.java.net/issues/#?jql=fixVersion%20%3D%209%20and%20type%20%3D%20JEP 

Ryan Daniels replied on Fri, 2014/09/05 - 1:58pm in response to: Hernâni Cerqueira

I agree whole heartedly!

Ryan Daniels replied on Fri, 2014/09/05 - 2:05pm

No multi-line strings? How can they not add such a basc feature after all this time?

Pierre-yves Saumont replied on Thu, 2014/09/11 - 4:04am

Nothing interesting for me in this list. Here is what I would like to see in Java 9:

  • Recursion with TCO
  • Value classes
  • Case classes
  • Immutable collections
  • Tuples
  • Either
  • Pattern matching
  • Variance
  • Optional laziness
  • Better type inference


Karthik Karuppannan replied on Fri, 2014/09/12 - 1:38pm

modularity is very much needed... but not with the current baggage and spaghetti of OSGi...

Jay Askren replied on Wed, 2014/09/17 - 11:50am

It is still early, and these are the features proposed "so far".  More features may be added later as we get closer to Java 9.  For instance, there are people working on the ability to use the GPU from Java, which could go in to Java 9 if it is finished in time.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.