[icedtea-web] RFC: Patch to check the manifest file for main class

Jiri Vanek jvanek at redhat.com
Thu Mar 8 02:44:32 PST 2012


On 02/28/2012 03:54 PM, Deepak Bhole wrote:
> * Omair Majid<omajid at redhat.com>  [2012-02-27 20:01]:
>> On 02/27/2012 05:42 PM, Deepak Bhole wrote:
>>> Hi,
>>>
>>> This commit introduced a check for main in HEAD:
>>> http://icedtea.classpath.org/hg/icedtea-web/rev/bd59947fa857
>>>
>>> However it causes an error if the main method is listed in the manifest
>>> rather than JNLP (e.g.: http://pardemo02.ilog.fr/mapviewer/mapviewer.jnlp)
>>>
snip
>>> +        }
>>> +
>>
>> Just throwing this one out there: if there is no jar marked main, should
>> we try and iterate over all jars to find a jar with a Main-Class in the
>> manifest file?
>>
>
> I thought about that, but that would be ambiguous. e.g. if there are 2
> jars with a Main-Class, which one do we pick then? So I figured it would
> be better to only look in main jar and if it is not supplied, the app
> will fail to launch.
>
> New patch with getCacheFile attached.
>

I have just noticed interesting behaviour -
two jars marked as mian, application-dec pointing to main class in one ofthem => invalid xml exception (hidden in headless mode but this does not meter)
two jars marked as mian, application-dec without  main class, main class specified in one or both jars, firs in-manifest main lcass is launched.

I do not consider this behaviour as wrong, I was just surprised that invalid xml is not thrown in second case.

Reproducers with this behaviour are on review (or will be in few minutes), is marked as suspicious but is passing (as I considered this behaviour as possible)

J.
> Thanks,
> Deepak




More information about the distro-pkg-dev mailing list