I just converted a Java Web Start application to an applet. It is taking more time than before to load, so I enabled the highest level of logging in the console.
The program uses a lot of resources stored in .jar files. However, it tries to download some of them from the codebase on the web server! The response is obviously 404, but it still wastes a lot of time since there are so many files. And once everything finally loads, all of the resources work as they should! Why is it doing this, and how do I get it to stop?
Resource loading code:
public static BufferedImage loadImage(String name, String path) throws IOException
{
URL url = AssetManager.class.getResource(path.replace("resource://", "resources/"));
if(url == null)
throw new IOException("Resource not found: "+path);
BufferedImage image = ImageIO.read(url);
images.put(name, image);
return image;
}