IcedTeaWeb Started application apparently tries to download classpath resources from server

Jiri Vanek jvanek at redhat.com
Thu Feb 21 12:29:53 UTC 2019


Ok. I need to triple check this.

Still, I would say this *was* correct behaviour.  The codebase was there to provide various
resources. This osunds like a change I had not noticed.

J.
On 2/21/19 1:15 PM, Christian Svedin wrote:
> Maybe I'm not explaining what I think might be a problem correctly.
> 
> As far as I can tell, the only thing webstart is supposed to download
> from a server is what is listed in the jnlp, nothing else.
> That's how I read this part of the webstart FAQ: https://docs.oracle.co
> m/javase/8/docs/technotes/guides/javaws/developersguide/faq.html#s113
> 
> --------------------
> Can I deploy any application with Java Web Start?
> 
> Java Web Start is an application launcher for Java applications that
> are written to be web-deployed.
> 
> An application must be delivered in a set of JAR files and all
> application resources, such as images, configuration files, and native
> libraries must be included in the JAR files. The resources must be
> looked up using the method ClassLoader.getResource() or an equivalent
> method. Java Web Start only transfers JAR files from the web server to
> the client.
> 
> If an application is written to run in a restricted execution
> environment (sandbox), then access to disk is not permitted and the
> application may only connect to the host on which it resides.
> --------------------
> 
> But when I use IcedTea Webstart it tries to download all kinds of
> files.
> For example, it tries to load ResourceBundle properties files from the
> server, where it might need to try a few names before finding the ones
> to use which results in alot of extra server calls.
> 
> So what i suggest is that when the classloader looks for non-jar
> resources it should not fall back to loading them from the server. Is
> that reasonable?
> 
> / Christian
> 
> 
> On Thu, 2019-02-21 at 12:21 +0100, Jiri Vanek wrote:
>> On 2/21/19 8:51 AM, Christian Svedin wrote:
>>>
>>> On Wed, 2019-02-20 at 16:24 +0100, Jiri Vanek wrote:
>>>>
>>>> Yes. Codebase is where your code is laying, and thus where ITW is
>>>> searching for it.
>>>>
>>>> On 2/20/19 2:12 PM, Christian Svedin wrote:
>>>>>
>>>>>
>>>>> I have an application that is started using webstart. After the
>>>>> application has started I get
>>>>> logging on my server that says that something is trying to load
>>>>> resources that doesn't exist.
>>>>>
>>>>> To me it looks like my webstarted application is trying to load
>>>>> classes/resources from the url that
>>>>> is codebase in my jnlp.
>>>>>
>>>>> For example, it seems like
>>>>> getClass().getClassLoader().getResource("/missing/resource")
>>>>> tries
>>>>> to
>>>>> load from http://my.application/webstart/missing/resource if my
>>>>> codebase is
>>>>> http://my.application/webstart
>>>> Where else would you like it to look?
>>>>
>>> I would prefer that it looks inside the resources listed in my
>>> jnlp-
>> And it is not doing so?
>>> I have just tried in-jar resource, and it was tried first.
>>>>
>>> file. Not trying to dynamically load classes from the codebase.
>>> That's
>>> how oracles webstart does it right?
>>>
>>> If you expect it to load from jars, then you are right, and that is
>>> first place it should look.
>>>
>>>
>>>
>>> Does the classloader i get from icedtea-web behave the way I think?
>>> Is this how it's supposed to
>>> work? ��
>>>
>>> If this is how it's supposed to work, doesn't this have quite big
>>> performance implications?
>>>
>>>
>>> / Christian
>>>
>>>
>>>
>>>
>>>
>>>


-- 
Jiri Vanek
Senior QE engineer, OpenJDK QE lead, Mgr.
Red Hat Czech
jvanek at redhat.com    M: +420775390109


More information about the distro-pkg-dev mailing list