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

Omair Majid omajid at redhat.com
Fri Mar 2 13:00:06 PST 2012


On 03/02/2012 03:48 PM, Deepak Bhole wrote:
> * Omair Majid <omajid at redhat.com> [2012-03-02 15:44]:
>> On 03/02/2012 03:37 PM, Deepak Bhole wrote:
>>> * Omair Majid <omajid at redhat.com> [2012-03-02 12:45]:
>>> ...
>>> ...
>>>
>>> Hi Omair,
>>>
>>>>       *
>>>>       * @param enableCodeBase whether to add the code base URL to the classloader
>>>>       */
>>>> -    protected AppletInstance createApplet(JNLPFile file, boolean enableCodeBase, Container cont) throws LaunchException {
>>>> +    protected AppletInstance createApplet(JNLPFile file, boolean enableCodeBase, Container cont, boolean isPlugin) throws LaunchException {
>>>>          try {
>>>>              JNLPClassLoader loader = JNLPClassLoader.getInstance(file, updatePolicy);
>>>>  
>>>> +            // Do not create new AppContext if we're using NetX and icedteaplugin.
>>>> +            // The plugin needs an AppContext too, but it has to be created earlier.
>>>> +            if (context) {
>>>> +                if (!isPlugin) {
>>>> +                    Thread.currentThread().setContextClassLoader(loader);
>>>> +                    SunToolkit.createNewAppContext();
>>>> +                }
>>>> +                doPerApplicationAppContextHacks();
>>>> +            }
>>>> +
>>>
>>> Will there be a case where isPlugin == false but createApplet is called?
>>> Is this when applet-desc is used?
>>>
>>
>> Yeah, an applet run using 'javaws /path/to/applet.jnlp' (where the jnlp
>> file contains an applet-desc) will also result in createApplet() being
>> invoked (or at least that's what the code paths indicate - see
>> net.sourceforge.jnlp.Launcher.TgThread.run()).
>>
> 
> Is there a link to such a jnlp?
> 

I don't think I have actually ever tested this (so no idea how well this
works at all).

Try:
http://www.cs.brown.edu/exploratories/freeSoftware/repository/edu/brown/cs/exploratories/applets/fft1DApp/1d_fast_fourier_transform_java_jnlp.jnlp

Thanks,
Omair



More information about the distro-pkg-dev mailing list