I have a question about classloader system used in applets:
Let’s imagine that i have created some applet which on its own downloads some jar ( app connects to server and download jar in its own thread
- using urlConnection.getInputStream() etc. ) . In this loaded jar i have some data for example images sound and java class files.
And my questions are:
-
If in my applet I will download some image (which is stored in previous loaded jar) using getImage() func what will happen. For example will jvm search
this image in all jars that i downloaded in app or will it immediately start downloading it from server ? -
The same question is about other data which can be accessed using class.getResourceAsStream() or java class files using Class.forName() func , will jvm first search resource in all jars and then try in server.
-
Or maybe I must add to applet tag what jars i will be using if I want to use these above ideas for example like this:
<applet code="app.class"> <PARAM NAME="archive" VALUE="appMain.jar , images.jar , binaryData.jar "> </applet>
Can anyone answer ???