Saturday, July 11, 2015

JDK 9 Module System Jigsaw 1 from N

The goal of this first post is to give the places in which you can see information related to JDK9 module System aka Jigsaw, and to see some of the problems that java has today without using a module system.

Java as platform does not have a module system defined and this is causing a lot of problems as jar, and classpath hells, version problems, from 7to 8 years ago Java is trying to implement a module system that can fix the previous problems from the JSR 277, 294 until nowadays, we do not have any solution to this problems, but for Java 9, Oracle is implementing the Jigsaw module system into the runtime of the Oracle Java implementation.

First of all, what are the problems that we have:


Jar hell, is when you have to version of the same jar file in your runtime and your application is using the wrong version for example you have jar A.1, and A.2 in your classpath, and your application use A.2, the classloading mechanism only see the first jar file that the runtime loads, and ends loading A.1, this cause that your application will be running with the wrong jar file.

Classpath hell, the classpath hell, are all the problems that you have with the classpath as the no standard way to have your jar files, no standard way to define the place in which you want to put your classpath, this can produce indirectly the jar file hell, because you can define a jar file in any place of your classpath without know when a secondary jar file is located.

Project Jigsaw comes with a solution, and with a Standard module system file format to give a solution for the Jar and classpath hells.

Websites and internet pages in which you can see Jigsaw information: 


First, you can find information in the project page: http://openjdk.java.net/projects/jigsaw/
See the JDK9 project source code: http://hg.openjdk.java.net/jdk9

JEPs page information for JDK 9 module system:

  1. JEP 200: The Modular JDK
  2. JEP 201: Modular Source Code
  3. JEP 220: Modular Run-Time Images

JSR 376 in OpenJDK: http://openjdk.java.net/projects/jigsaw/spec/
JSR 376 in JCP website: https://jcp.org/en/jsr/detail?id=376
System Requirement for Java Platform Module System.

Conclusions:


As we saw in this post, we touched commons problems that Java has today as the classpath and jar file hells, and finally some links were provided with additional information. I hope that you find this post interesting, and please give your feedback, and comments, finally do not forget the next post that I will be done related to JDK9 module system in which I will cover the JEP 200.



1 comment:

Revolutionizing Stream Pipelines with Custom Intermediate Operations JEP 473: Stream Gatherers (Second Preview)

Introduction In the ever-evolving scene of Java improvement, the Stream API has been a foundation of utilitarian programming paradigms sin...