Recently I have red some interesting articles regarding this new plan of Sun’s, to modularize the JDK.

I have to say that when I first read about this I was a bit angry because of theyr intention to change the Java language and implement the modularization mechanism directly using special keyword. At first glance I had the feeling that this is too much change to implement a runtime modularization mechanism, considering the fact that OSGi has done it really nicely without any change in the language, but back than I have overlooked something, which I just realized after reading some articles about this topic.

Sun tries to address the most urging problem of Java platform: The huge monolithic runtime.
So the first taught seem to be to have this big JRE and split into modules and have a dynamic update mechanism which would ONLY update the changed parts of the runtime and not all, hereby minimizing the amount of download needed and time spent on updating. To achieve this there is no other way than implementing the modularization concept at the Java language level. Nice idea. This, if done well, will actually take the Java Runtime to a next level, and maybe will put the language back to the RIA race, next to Flex and Silverlight (even if not a 100% real competitor but still…).

Even if there a huge debate over if this approach mostly because of why is Sun implementing a new modularization system and is not using the already de-facto standard, OSGi, to accomplish the modularization task, I still think that the JRE and JDK modularization should be done in lower layers (inside the language or VM) rather than in some layers above the runtime. I have to highlight that I find this approach as good idea ONLY for JRE and JDK modularization.

If I think of runtime I think that the OSGi would be the best way to have application modularization done well, because of the flexibility and maturity of this concept. So hereby I would consider as bad idea to imply using a language based modularization for everybody. I guess the backward compatibility should be maintained and the option to chose any modularization framework should be left in the hands of the application developers.

Have look at the articles I found about this topic:

The massive, monolithic JDK
The Modular Java Platform
Project Jigsaw
OSGI-About Jigsaw
Project Jigsaw II
Project Jigsaw III
Modularity in Java-Alex Buckley 

JDK 7

And some related articles:

OSGI standard questions
Classpath hell just froze over

Happy coding

N