Monday 10 November 2014

One more library for JDK 9?

On Tuesday night in Belgium at Devoxx I'm asking the question "Is there room for one more library in JDK 9"?

With JDK 9 full of modules, and the long wait until JDK 10 for more interesting things like value types, I pose this question to the community to ask what would you add to JDK 9 if you could?

But, I'm asking more than that. Any additional work for JDK 9 would have to be led by someone outside Oracle capable of drawing together a community. And whatever it is it would need to be tightly focussed - the timescale available is limited.

Think of something that could be expressed in 20 classes or less. Involves only code and no library or JVM changes. Something that the JDK doesn't have, but you think it should. Think about whether you'd put in your time to try and make it happen.

But also think about whether your idea should be in the JDK? Is it better as an external library? What makes it necessary to be in the JDK, especially a modularized JDK? Will Oracle's Java stewards support the idea?

As an example, I'll put forward Joda-Convert, a very small and simple library that provides a mechanism to convert and round-trip a simple object (like a VALJO) to a formatted string, ideal for use in serialization, such as JSON or XML (and noting that JSON is coming to JDK 9...). I'm sure that if you're reading this, you've got some other ideas!

If you've got any thoughts, ideas, or want to suggest something, please add a comment. But remember the rules above - there is no free lunch here. Are you willing to take a lead on your idea?


  1. Not really a library (2 classes instead of 20), but I'd love to see Multimaps and Multisets in the JDK. They seem to be a common use case.

    The immutable collection classes from Guava are always useful too.

  2. I would like to work on something like copy from/to streams/readers as it's already used within the java.nio.file.Files

  3. These days I've been looking for a tree in the Java collections framework. There's a TreeMap and a TreeSet, but as far as I can see, there's no (binary) Tree. I can't believe it's true (even with StackOverflow saying it's true, see I'd like to contribute it. Contact me if you're interested (@beyondjava on Twitter or via my blog).

  4. I think some utilities classes would come in handy. Of course, 99% time I spend developing real commercial projects, so I have guava/ apache commons/ spring utility classes etc. But sometimes - Android applications, some pet projects, while giving lessons - I have pure JDK.

    So StringUtils, StringBinaryUtils (org.apache.commons.codec.binary.StringUtils), CollectionUtils, BeanUtils etc. could be included in JDK.


Please be aware that by commenting you provide consent to associate your selected profile with your comment. Long comments or those with excessive links may be deleted by Blogger (not me!). All spam will be deleted.