Re: About Class.forName(...)
Posted By:
WarnerJan_Veldhuis
Posted On:
Sunday, June 17, 2007 05:37 AM
Class.forName() is used so that the static initializer block is run inside the Driver. This Driver then registers itself at the DriverManager. The URL that you hand to the DriverManager will contain a prefix like mysql, jdbc:odbc, etc. The DrvierManager will find which driver is suitable to handle this URL. Since you registered the Driver with Class.forName(), it's there to be found.
Happy coding.