<?xml version="1.0" encoding="us-ascii"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><lastBuildDate>Sat, 04 Jul 2009 09:50:41 GMT</lastBuildDate><atom:link href="http://www.fwicki.com/rss/ziller54/Java-Web-development" rel="self" type="application/rss+xml" /><ttl>24</ttl><title>Java &amp; Web development</title><link>http://www.fwicki.com/fwickis/ziller54/Java-Web-development</link><description>News relative to java &amp; web development</description><generator>Fwicki.Com - Fwicki Feed Generator</generator><language>en-us</language><image><url>http://www.fwicki.com/images/ui/feed-link.png</url><title>Fwicki - RSS Management</title><link>http://www.fwicki.com/fwickis/ziller54/Java-Web-development</link><description>Fwicki - RSS Management</description><width>88</width><height>90</height></image><item><title>Classpath hell just froze over?</title><link>http://www.blogger.com/feeds/18772002/posts/default</link><guid>http://www.blogger.com/feeds/18772002/posts/default687</guid><description>Other blogs seems to drive this blog nowadays. Just read &lt;a href="http://sellmic.com/blog/2009/06/11/classpath-hell-just-froze-over/"&gt;Classpath hell just froze over&lt;/a&gt;. This raises the questions where OSGi stands in the relation with JSR 294. I am not speaking from an official OSGi point of view, but I can of course give my personal opinion. I therefore posted a comment on the original blog but it turned out to be its own blog ...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;JSR 294 contains 2 parts:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;the module keyword&lt;/li&gt;&lt;li&gt;module-info.java, with dependencies&lt;/li&gt;&lt;/ul&gt;I like the &lt;span style="font-family: courier new;"&gt;module&lt;/span&gt; keyword. We discussed this in 294 and we have some tentative agreement of the model, but the details still need to be worked out. However, agreement here is desirable and achievable.&lt;br /&gt;&lt;br /&gt;The &lt;span style="font-family: courier new;"&gt;module-info.java file&lt;/span&gt;? I have my severe doubts and have expressed this in the expert group. I do not think we fully understand the interactions with IDEs like Eclipse, IntelliJ, Netbeans, JDeveloper, etc. Currently, the command line with javac is completely driving the design while imho the IDE will be the common case for &lt;span style="font-style: italic;"&gt;anyone&lt;/span&gt; needing modularity. Nobody needs modularity for a &lt;span style="font-family: courier new;"&gt;Hello World&lt;/span&gt; program, and letting this use case drive the design seems plain wrong.&lt;br /&gt;&lt;br /&gt;One of the problems with this approach that I'm seeing is that a lot of dependencies are already specified in the sources (import package anyone?) and that a smart IDE can help find the proper modules to import those packages from. However, selecting package for import needs a wide range of modules because when you're developing, you want completion support in the IDE. However, when you have compiled your code, the compiler knows &lt;span style="font-style: italic;"&gt;exactly&lt;/span&gt; which module was selecrted out of this wide scope it was compiled against.&lt;br /&gt;&lt;br /&gt;And not to forget the build tools, they will start having to interpret the module-info file and link to the appropriate module system to find their class path. Today, a build tool &lt;span style="font-style: italic;"&gt;tells&lt;/span&gt; the compiler its class path, in the future it would first have to compile or interpret the Java file. This alone will probably kill 90% of the ant scripts because the class path is used in other places then compiling. Also maven will have to start to interact with this.&lt;br /&gt;&lt;br /&gt;This is not all. The current approach for &lt;span style="font-family: courier new;"&gt;module-info.java&lt;/span&gt; is creating a meta-module system. Both Jigsaw, OSGi, and any other module systems can put their metadata in the file. This is the famous design by committee problem: let's each have it our own way and make the other optional. Good for vendors, bad for users. This is something that I am always fighting inside the OSGi. Having a meta-module system will cause severe fragmentation on the module layer. Some people hope for runtime interaction between module systems. Well, this will be very hard, if not impossible. Java module systems are just to complex to be able to map one to another without causing some severe pain.&lt;br /&gt;&lt;br /&gt;Then about Jigsaw. It is very focused on breaking up the JDK into modules. I like the native installers but I dislike the fact that they put this native packaging stuff in my face. Java should abstract the platform so I can write code for&lt;span style="font-style: italic;"&gt; any&lt;/span&gt; platform and distribute my code in a singular form. It's Java's original promise to deploy and manage this code on all the variety of VMs/OSs/packagers out there. There are hundreds of VM's and even more VM-package manager combinations. There is no way anybody can support all of these combinations. Write once, deploy everywhere, and then run anywhere? This all goes against the original promise and architecture of Java.&lt;br /&gt;&lt;br /&gt;Jigsaw is too simple for the kind of applications in the enterprise space. Most of the class path problems are still in the module-path: split packages, no real hiding of classes (they will be protected by the module keyword only, not like OSGi invisible to other bundles), no multiple versions of the same JAR to solve hard dependency problems in large applications. Looking at Mark Reinhold's slides I think he agrees, Enterprise applications should be build on OSGi. However, small applications do not have to bother with modularity, so why allow Jigsaw to be used for applications at all? Unfortunately, if Jigsaw becomes part of the JDK delivery, people will start using it, causing immediate irreversible fragmentation.&lt;br /&gt;&lt;br /&gt;Ok, to summarize. The module keyword is heavily supported by me and other OSGi people I know. It would allow us to put the bundles in the accessibility check of the Java VM. We're not there yet, but it looks good.&lt;br /&gt;&lt;br /&gt;From a module system point of view I think we're moving into a direction of a meta-module system, where one of the two users of this meta-module system has an awful lot of homework left to do. After ten years of working on OSGi I would not yet dare to say that I completely understand Java module systems, I therefore shudder of the thought of a meta-module systems ...&lt;br /&gt;&lt;br /&gt;Hope this helps to enlighten some issues.&lt;br /&gt;&lt;br /&gt;  Peter Kriens&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18772002-7551771690349841270?l=www.osgi.org%2Fblog'/&gt;&lt;/div&gt;</description><pubDate>Sat, 20 Jun 2009 07:12:08 GMT</pubDate></item></channel></rss>