[RFC][IcedTea-WEB]: Fix for PR765

Deepak Bhole dbhole at redhat.com
Tue Aug 9 12:41:49 PDT 2011


* Saad Mohammad <smohammad at redhat.com> [2011-08-09 15:22]:
> On 08/09/2011 03:09 PM, Deepak Bhole wrote:
> >* Saad Mohammad<smohammad at redhat.com>  [2011-08-09 15:01]:
> >>On 08/08/2011 03:03 PM, Saad Mohammad wrote:
> >>>This is the patch for PR765:
> >>>    http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=765
> >>>
> >>>This bug is reproduced by having the jar (with the main class)
> >>>marked as lazy with additional resources (if any) that are also
> >>>marked as lazy.
> >>>
> >>CHANGELOG:
> >>
> >I see that the first jar is being added to the initial list. Is it
> >guaranteed to contain the main method?
> >
> >Cheers,
> >Deepak
> >
> No, it does not guarantee that the first jar will have the main
> method; but it will not stop the launch of the application. At the
> moment, if all jars are marked 'lazy', it will not initialize any
> jars and the application will fail to launch. As long as there is at
> least one jar that can be initialized, it will not fail the launch
> of the application (even if the main class is in a different jar
> that's marked as lazy).
> 
> I was looking into different ways of finding the jar with the main
> class but it doesn't seem to be possible unless we download all the
> jars (including lazy ones) and go through each jar entry one by one.
> This would defeat the purpose of having lazy jars.
> 

Ah okay.

Please repost this with a NEWS entry then and I will approve.

Thanks,
Deepak

> >>2011-08-08  Saad Mohammad<smohammad at redhat.com>
> >>
> >>     * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java:
> >>     (initializeResources): Initializes the first jar file if all resources
> >>     are marked as lazy jars
> >>
> >>
> >>[ . . .]
> >>
> >>-- 
> >>Cheers,
> >>Saad Mohammad
> >>
> >>diff -r defa7d0051bf netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
> >>--- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java	Wed Aug 03 14:11:11 2011 -0400
> >>+++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java	Tue Aug 09 14:50:39 2011 -0400
> >>@@ -428,6 +428,10 @@
> >>                                  jars[i].isCacheable() ? JNLPRuntime.getDefaultUpdatePolicy() : UpdatePolicy.FORCE
> >>                                 );
> >>          }
> >>+
> >>+        //If there are no eager jars, initialize the first jar
> >>+        if(initialJars.size() == 0)
> >>+            initialJars.add(jars[0]);
> >>
> >>          if (strict)
> >>              fillInPartJars(initialJars); // add in each initial part's lazy jars
> 
> 
> -- 
> Cheers,
> Saad Mohammad
> 



More information about the distro-pkg-dev mailing list