I am using the following code to attempt to load a .png file from a jar on the 'net:
URL url = null;
String ref = "/images/actors/29/boy_sta
url = new URL("jar:http://www.rainglen.com/testlaunch/readingpng_actors29.jar!
" + ref);
if (url == null)
fail("Can't find ref: " + ref);
// use ImageIO to read the image in
BufferedImage sourceImage = ImageIO.read(url);
When I run from my IDE, the .png is loaded from the jar on the server and displays, etc, but when I run the same code on the server in applet or Java Web Start application form, my url var comes up null.
I'm assuming I don't need to sign my jars or set security to allpermissions in my .jnlp file since I am accessing the same server that my applet is on. I'm hoping this can be solved without signing jars, but I am willing to go that route if that is the only solution. By the way, I am able to write data to and from the server elsewhere in my code so is seems server access should be available in this case.