In my project I'm downloading an Applet and then adding it to the classpath and displaying it, however it doesn't seem to be able to find the resource files
File f = new File("jars/myAppletJar.jar");
URLClassLoader urlCl = new URLClassLoader(new URL[]{f.toURL()},System.class.getClassLoader());
Class clazz = urlCl.loadClass("MyAppletMainClazz");
String[] args = {};
new MainFrame((Applet) clazz.newInstance(), args, 400, 400);
It throws a null pointer when attempting to find the resources in that jar. The applet works fine with run on its own.
How do I load the resources from the dynamically added jar into the classpath?