The Java Module System

Java, Necessitas Add comments

JSR 277: Java Module System proposes to end “JAR hell”. The plan is to replace the current JAR/WAR/EAR system with something that supports versioning, metadata and dependency specification. It draws on what has been learned from technologies such as .NET Assemblies, OSGI, Eclipse and Netbeans.

The JSR is attempting to create a reliable mechanism for expressing, resolving, and enforcing the dependency of one module upon another. It’s goals are admirable, JAR hell has been a pain in the side of anyone who has had to deal with application servers that expose classes from versions of jars (for no good reason other than plan dumb ass lazyness) that aren’t compatible with your module. So JSR 277 aims to help us by:

  • Adding explicit versioning of both the module and it’s dependency declarations
  • Providing a repository for storing and retrieving modules on the machine with versioning and name space isolation support (it’s unclear if they mean on the current machine are something more global)
  • Adding runtime support in the application launcher and class loaders for the discovery, loading, and integrity checking of modules.
  • Allowing you restrict what is exposed to other modules by your module.

It all sounds great, the proof will be in the pudding though and I’ll be keeping a close eye on this one. Unfortunately we wont be seeing it in our applications until around 2007. For now at least we have ivy for build time dependency management.

Leave a Reply

Couldn't find your convert utility. Check that you have ImageMagick installed.