Results 1 to 2 of 2
- 06-26-2007, 01:31 PM #1
Member
- Join Date
- Jun 2007
- Posts
- 19
- Rep Power
- 0
Adding JARs to the classpath at runtime?
I have an JAVA application with a plugin-architecture. Each plugin is described in a config file that tells the application in which JAR the plugin is found etc.
My problem is this: some plugins need additional JARs on the classpath. E.g. the plugin might need the mysql jdbc JAR on the classpath.
What do I have to do to dynamically add a couple of JAR URLs to the classpath so that the system class loader can automatically load from these additional JARs?
I experimented with using my own URL classloader, but the problem I face is this: I add a JAR with addURL and later want to e.g. use the JDBC jar or the javax.script.* libraries to do stuff. Internally, the objects from these libraries want to load classes from the CLASSPATH, but it seems my previous addURL call did not accomplish this.
Either I am still missing some important points here or this has to be done differently.
:confused:
- 06-26-2007, 10:42 PM #2
Similar Threads
-
Set classPath?
By rgbosque in forum New To JavaReplies: 3Last Post: 02-07-2008, 02:14 PM -
Manifest file in executable jars
By Java Tip in forum Java TipReplies: 0Last Post: 12-15-2007, 08:16 PM -
GNU Classpath 0.96.1
By JavaBean in forum Java SoftwareReplies: 0Last Post: 11-01-2007, 04:14 PM -
GNU Classpath 0.96
By JavaBean in forum Java SoftwareReplies: 0Last Post: 10-16-2007, 06:35 PM -
how to find unused jars??
By orchid in forum EclipseReplies: 4Last Post: 06-08-2007, 10:35 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks