jdbc - Alternative way to load DB driver in Java -


Is there any other way to load the DB driver from class.forName ?

main code class # forName is to extract compilation time dependency on a special JDBC driver ( And make it usable at run-time) If you are using the Oracle driver code in your program (to use your non-standard JDBC extension) and the driver is forced to hardcode the name of the class If not, you can also make a regular charge of the driver class Are.

New oracle.jdbc.driver.OracleDriver ();

Comments