Loading icon in signed jar
843807Nov 17 2005 — edited Dec 12 2005Hi,
After long hours of profiling, I found a very very very strange problem... Here it is :
- I have developped an signed applet
- At the beginning, I was loading icons in a remotely way (for example, if the applet is http://localhost/applet.jar, I was loading http://localhost/img/myicon.gif)
- This way isn't really clean (is it ? ;)) and I have problems with icons that don't load... So I decided to put them in the applet jar and load them with the method using getClass().getClassLoader().getResource("myicon.gif");
But, I have found that the time of loading depends on the network speed. In LAN it works perfectly, but over internet, it's really slow (between 10 and 20 times slower) to load icons...
Could someone tell me why loading icons in a signed jar is far more slow than through an internet URL ? Does it mean there are a lot of communications between the client and the server (for the loading time depends on the network speed) ? If yes, why ? And how can I solve this problem ?
Thanks, and sorry for my bad english ^_^