Results 1 to 1 of 1
- 02-02-2010, 10:54 AM #1
Member
- Join Date
- Feb 2010
- Posts
- 2
- Rep Power
- 0
How Add new classess to the System Classs loader.
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 :D
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 :cry: EVERY TIME I NEED THIS CLASS I HAVE TO READ THE JAR. which is not possible in my sitiution. :thumbdown:
I will really appriciate any help regarding this.
Similar Threads
-
TCCL (Thread context class Loader) ???
By OutOfMemory in forum Advanced JavaReplies: 0Last Post: 01-07-2010, 12:38 PM -
Class loader
By JavaJunkie in forum New To JavaReplies: 1Last Post: 05-06-2009, 01:17 PM -
Java Loader error message "UNC paths not supported"
By Johnny562 in forum New To JavaReplies: 1Last Post: 07-01-2008, 10:24 PM -
Smart Cache Loader 0.31
By JavaBean in forum Java SoftwareReplies: 0Last Post: 08-11-2007, 10:45 PM -
Smart Cache Loader 0.29
By levent in forum Java SoftwareReplies: 0Last Post: 07-26-2007, 08:09 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks