Re: [INTERFACES] Loading JDBC - driver
От | Peter T Mount |
---|---|
Тема | Re: [INTERFACES] Loading JDBC - driver |
Дата | |
Msg-id | Pine.LNX.4.04.9902150858340.19908-100000@taer.maidstone.gov.uk обсуждение исходный текст |
Ответ на | Loading JDBC - driver ("Sergei Chernev" <ser@nsu.ru>) |
Список | pgsql-interfaces |
On Mon, 15 Feb 1999, Sergei Chernev wrote: > Hello, > > I wonder, if there is a way to load JDBC- driver from network. > I know the method to connect using jdbc6.4.jar on local disk > and editing CLASSPATH, but it seems to me inconvenient to > ask user to download driver and edit environment. > > Does it possible to use construction like that: > Class.forName("http://somewhere.com/postgresql.Driver/jdbc6.4.jar/postgresql > .Driver").newInstance(); ? > Excuse me if it is FAQ, but I didn't find anything of the kind in mailing > list. That's ok. What you need is a custom class loader, that fetches the jar file from a url, then extracts the classes from it. This is how browsers do it, but as to how you would write a class loader is another question (one of those things I havent got round to trying yet) ;-) Peter -- Peter Mount, IT Section petermount@it.maidstone.gov.uk Anything I write here are my own views, and cannot be taken as being the official words of Maidstone Borough Council
В списке pgsql-interfaces по дате отправления: