db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Boynes <jboy...@apache.org>
Subject Re: derby jdbc load driver
Date Wed, 10 Aug 2005 22:02:20 GMT
Oyvind.Bakksjo@Sun.COM wrote:
> 
> What instance? Since there is no .newInstance() here, this can be 
> understood as if the class has a static initializer which creates an 
> instance of the class. And if so, why should the application do 
> .newInstance()?
> 

 From memory, some drivers do not register in a static initializer but 
in the constructor. I don't believe this is compliant behaviour but if 
you want something to work ...

Many applications will be choosing the Driver dynamically so something like:

    Class.forName(System.getProperty("driver")).newInstance()

is most likely to work.
--
Jeremy

Mime
View raw message