I want to develope a
jsp page which should take a JAR file as an input and then add all the classess in that jar to to the System Class Loader. it should be such that once loaded these classess should be availabele to the whole system wihout needing to load the classess from the jar.
I have created a URLClassLoader
public static URLClassLoader getURLClassLoader(URL jarURL) {
return new URLClassLoader(new URL[] { jarURL }, ExternalJarUtils.class.getClassLoader());}
=========================================================
and here i am loadining the class.
------------------------------------
urlLoader = ExternalJarUtils.getURLClassLoader(new URL("file",url, jarName));
aClass = Class.forName(jobClass, true, urlLoader);
========================================
The PROBLEM IS
EVERY TIME I NEED THIS CLASS I HAVE TO READ THE JAR. which is not possible in my sitiution.
I will really appriciate any help regarding this.