A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
DriverManager.registerDriver or class.forName
Joined: Apr 16, 2005
Sep 29, 2006 01:27:00
which one is preferable?
class.forName("class");//loads the calss at Runtime
what to do?
A = HARDWORK B = LUCK/FATE If C=(A+B) then C=SUCCESSFUL IN LIFE else C=FAILURE IN LIFE
Joined: Mar 06, 2001
Sep 29, 2006 01:37:00
From the API:
public static void registerDriver(Driver driver) throws
Registers the given driver with the
. A newly-loaded driver class should call the method registerDriver to make itself known to the
Therefore the DRiver should call registerDriver when it loads (via Class.forName()) therefore you should not call it yourself.
I agree. Here's the link:
subject: DriverManager.registerDriver or class.forName
How to instanciate a class by name?
Loading of Classes
Dynamically loading a class
JDBC, mysql connector/j, face a problem to connect mysql 5.1 and JSE.
what this method do in JDBC?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014