[icedtea-web] RFC: fix L&F issues with swing applications

Omair Majid omajid at redhat.com
Fri Mar 2 09:45:23 PST 2012


On 03/01/2012 04:18 PM, Deepak Bhole wrote:
> * Omair Majid <omajid at redhat.com> [2012-03-01 16:07]:
>> Hi,
>>
>> The attached patch fixes a regression in icedtea-web 1.2 that occurs
>> with some jnlp applications (such as
>> http://www.soapui.org/jnlp/soapui.jnlp) where they are unable to set the
>> look and feel for dialogs.
>>
>> The actual problem was not just limited to that. It turns out that we
>> were not setting the right classloader for EventQueue - this classloader
>> is used by EventQueue to obtain Look-and-Feel related classes (among
>> other things). The only time to set this classloader is when the
>> EventQueue is being created. And the EventQueue is created when a new
>> AppContext is created, and the current context classloader of the thread
>> is used.
>>
>> The attached patch (I have tried to keep it minimal) tires to fix this
>> problem by creating the JNLPClassLoader as early as possible and then
>> sets it as the context ClassLoader for jnlp applications.
>>
>> I suspect applets may be affected by similar issues, but I don't have a
>> reproducer showing a problem and this patch doesn't change anything for
>> them.
>>
> 
> I am not sure how we could reproduce the problems with applets either. I
> think we can overlook that situation for now.
> 
> The patch looks good to me. Assuming you have tested it, please push to
> 1.2 and HEAD.
> 

While doing further testing, I discovered that this changes the order in
which jars are downloaded and security prompts presented. It is possible
for security prompts to appear before we check to see if the jnlp
application needs a new VM - it is possible to show repeated security
prompts and download indicators. I am not going to push this patch.
Sorry for the noise.

I tried changing the order so that the new AppContext is created after
the JNLPClassLoader proper is intialized and this seems to be a slightly
better approach (at least for a last-minute fix).

Thoughts?

Thanks,
Omair
-------------- next part --------------
A non-text attachment was scrubbed...
Name: classloaders-and-appcontext-01.patch
Type: text/x-patch
Size: 4767 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120302/5e26d14a/classloaders-and-appcontext-01.patch 


More information about the distro-pkg-dev mailing list