Modularity Finally Approved For Java 9 (infoworld.com)
An anonymous reader quotes InfoWorld:With a new round of voting completed this week, the Java Community Process Executive Committee passed by a 24-0 vote the Java Platform Module System public review ballot, the subject of Java Specification Request 376. In May, the same group, citing concerns over the plan being disruptive and lacking consensus, voted the measure down, 13 to 10... Red Hat, which voted no on the previous ballot but abstained from the latest one, said there were still several items in the current proposal that it wanted further work on. "However, we do not want to delay the Java 9 release," Red Hat said. Getting "real world" feedback on the modularity system will be key to determine where further changes need to occur, Red Hat said. The Eclipse Foundation, Hazelcast, and Twitter, all of which voted no previously and yes this time around, cited sufficient progress with modularity.
Java 9 is still slated for release on September 21st.
Java 9 is still slated for release on September 21st.
I am a professional programmer but I don't work with java, so I was confused about what, exactly, "modularity" means in this context. I clicked through a few links and found the info and figured I'd share here for anyone else in my position.
Java, as it stands, has no real mechanism for managing program dependencies (think, dynamic link libraries). Either a JAR file embeds all of the classes it uses or it loads external classes using something called the "class path system", where there is a programmatically accessible path where java code can look for class files to link in at runtime. This system is very simple, and lacks built-in versioning or encapsulation features. It's up to developers to build in their own versioning into the file structure. As you could guess, it's generally very brittle.
The new system replaces that with a concept of "modules". These are collections of classes with strong names, cryptographic signatures, version numbers, and members that are either public and advertised to code the imports the module, or private and for internal module use only. This is a huge step up from the idea of just going and loading class files out of some path. I'm actually astonished Java made it this far without such a feature!
You can find more info about the new module system here: http://openjdk.java.net/projec...