|
-
Aug 26th, 2003, 05:23 AM
#1
Thread Starter
Addicted Member
Loading a JAR dynamically
Hello
I have a Java App that needs to use JDBC Driver from various vendors, the thing is i don't know which at run time, so need someway of adding the JAR to my Apps Class Path so i can then load it as i would normally. Except i need this done while the application is running.
Now is this possible? and if so how'd i go about doing it as i've had no luck so far
So far, I've tried to extend URLClassLoader to handle the new jar file, using this (with loader.loadClass(name)), and also using a seperate thread and the contextclassloader of that. However, none of the things I've tried seem to work correctly. I would have thought that one of the things in the class was meant to add it to the DriverManager as soon as it was added using a loader.
Do I need to do something incredibly weird? I'm totally baffled.
Andy
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|