Skip to main content

Help me shape future of Java libraries

Posted by jst on June 22, 2009 at 9:42 AM PDT

We all know that the JDK is big and it ought to be smaller. The question is how to make it smaller and still keep backward compatibility with existing applications.

I think I know how to do it, I did something similar to NetBeans APIs five years ago. Thus I started a little
experiment to split JDK into pieces
. As that might influence the shape of your favorite libraries, I welcome you to help me or share your thoughts.

Visit Modular Java SE to join!

Related Topics >>


(Reposting with paragraphs...)

Hi! I actually have a question related to this effort: with the modularization of the JDK will we be able to keep different library versions for backward compatibility and new library versions where we substantially review and simplify the API?

I'll make a practical example, just to be clear. Let's take the IO packages: these have been done and redone a couple of times, to the point that when I teach to junior programmer how to use them I give them a "historic" perspective, so that it can make sense to them why they are what they are now. It would be nice to be able to hit the reset button, and review them for "new" programs, while letting the "old" program use the old API.

What I would expect is an "old" module, say "java-io-6" which implements all the old libraries, and a new module "java-io-7" with possibly the new refactored API. The new module would be used only if it was a clear stated dependency. If no dependency is used, then the old compatible one is used.

Java 7 would ship with both library versions, the 6 and the 7 (downloaded on demand). This will also allow me to write code in java 7 that is guaranteed to work on java 6 (right now is always a problem targeting older VMs while developing on newer ones, as you may start using new methods). And it would finally allow to review other parts (junking the Vector class, making Swing use Collections, etc...)

I have heard talking about modularization always in terms of making the JDK smaller, but it's the above aspect that really interests me more. And I also suspect that in making things more modular you would really like to break backward compatibility. So, instead of backward compatibility I tend more of think it as "keeping old things old and making new things new".

Are these thoughts being thought?