| Author |
Why Class.forName?
|
Pavan Sambare
Greenhorn
Joined: Aug 21, 2006
Posts: 23
|
|
When you load a JDBC driver you use Class.forName to load it. Any reasons why? What I thought is that you can pass an externalized string to Class.forName and thus use any Driver at runtime. Does it also have to do something with ClassLoader hierarchy?
|
SCJP 1.4 -- 98%<br />SCWCD 5 -- 97%
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
|
Have a search through this forum. THis question gets asked a lot, so there will be loads of answers. Als ohave a read through our JDBCFaqs, these cover a lot of the basics of JDBC.
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
 |
|
|
subject: Why Class.forName?
|
|
|