Is it possible to have an Applet use a local jar?
My Applet application needs to have some dependencies ( 66Mb worth of jars). The user can install the jars previously, but how can I use them from the applet?
I can have them saved to default locations c:/myApp and /usr/local/myApp
I tried loading them with:
ClassLoader loader = URLClassLoader.newInstance(
new URL[]{new URL("file://" + path + "/xuggle-xuggler-5.2.jar")},
JNLP2Manager.getCurrentManager().getAppletClassLoader()
);
Thread.currentThread().setContextClassLoader(loader);
But the jar does not get automatically added to classpath, I mean, I still have to load each class individually.
Doing the following works:
Class cls = loader.loadClass("com.xuggle.xuggler.video.ConverterFactory");
String testString = ConverterFactory.XUGGLER_ARGB_32;
But can I have all the classes added to the applet loader?
P.S. I know I shouldn't be using Applet , but Applet is still the best fit for my kind of application.