4 ms·
Good explanation. There are currently ways to manage the issues, OSGi, classloader hacks, or using something like Maven's shade plugin. They all have their own
by papercrane 11y ago
Good explanation. There are currently ways to manage the issues, OSGi, classloader hacks, or using something like Maven's shade plugin. They all have their own issues and pain points though.
The other thing that Jigsaw is bringing is modularizing the standard library as well. So if you don't want CORBA in your runtime image than you can leave it out.
- paulddraper 11y agoWhat's the downside to OSGi? And isn't that classloader magic?
- brianwawok 11y agoHave you used OSGi?
- paulddraper 11y agoYes. I just don't know why Jigsaw is far better, other then it being part of the language of course. Perhaps ignorance on my part.
- sheenobu 11y agoOne thing I remember is the idea that Jigsaw is specifically for modularizing the JVM and JDK itself while OSGI would be for modularizing applications built on the JVM. Here is an article about this but it I would admit it is OSGI biased: http://njbartlett.name/2015/12/03/jigsaw-is-a-shibboleth.html http://njbartlett.name/2015/12/03/jigsaw-is-a-shibboleth.htm...
- alblue 11y agoIt isn't really but aimed at a different use case. Everyone rallied against OSGi because the strict modularity showed developers that in general their application wasn't as modular as they thought it was; and the fact that class loaders enforced that permissioning model showed where random Class.forName and module busting code lived. Guess what? Those developers will have exactly the same problems with Jigsaw modules. What Jigsaw will do is educate Java developers that the pain points are in strict modularity rather than any one module system.
- needusername 11y ago> Guess what? Those developers will have exactly the same problems with Jigsaw modules. And many more. Jigsaw also locks down reflection. In addition Jigsaw lacks many work arounds that OSGi has to get software working (fragments, buddy classloading, dynamic imports, optional dependencies, capabilities, …). Honestly I have a hard time seeing any existing large code base work on Jigsaw.
- mike_hearn 11y agoNot any more. Requiring code modifications to use cross-module reflection was too painful and was dropped in the most recent Jigsaw iteration. You can reflect across module boundaries without problems now.
- needusername 11y agoEven for non-exported types?