[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.newcomer] Re: Loading jars dynamic from plugins

"Franz Philipp Moser" <pm@xxxxxxxxx> wrote in message 
news:1862fd296ce16b39d12fd52b781bcbe8$1@xxxxxxxxxxxxxxxxxx
> for example I wan't to "drop in" jdbc drivers, that will be used by the 
> core app loading them the "normal" way with 
> Class.forName("com.mysql.jdbc.Driver"). I don't know witch driver the end 
> user will use so it can be configured and added by installing the right 
> plugin.

JDBC drivers are kind of a special case in that the classes they load are 
not known at compile time and are also not usually available as Eclipse 
plug-ins.  Creating your own URLClassLoader is one possible answer, but 
"buddy loading" can also be an answer here - it's documented at 
http://wiki.eclipse.org/index.php/Context_Class_Loader_Enhancements#Buddy_Class_Loading 
and there's a pretty good writeup at 
http://book.javanb.com/eclipse-rich-client-platform-designing-coding-and-packaging-java-applications-oct-2005/ch20lev1sec5.html .