Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Dynamic loading jar files at runtime

807603Nov 26 2007 — edited Nov 26 2007
For a plugin framework, we're making it possible to put in .jar files into a dir of the app. So that when it starts it reads through the classes of the jar files and create plugin class instances of them. This all works as it should. HOWEVER, suppose one of these plugins require an external .jar file that it needs to run. How can we make this work?

Suppose one of the plugin jar files require "xstream-1.2.jar". This jar file could be put into the same dir. But how to we put it into the class path so that the plugin can run?

Help greatly appreciated.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 24 2007
Added on Nov 26 2007
13 comments
4,966 views