Here you can find the source of createDriver(String driverClassName)
public static Driver createDriver(String driverClassName) throws SQLException
//package com.java2s; import java.sql.Driver; import java.sql.SQLException; public class Main { public static Driver createDriver(String driverClassName) throws SQLException { try {/*from ww w . j a va2 s . com*/ return (Driver) Class.forName(driverClassName).newInstance(); } catch (IllegalAccessException e) { throw new SQLException(e.getMessage(), e); } catch (InstantiationException e) { throw new SQLException(e.getMessage(), e); } catch (ClassNotFoundException e) { // skip } try { return (Driver) Thread.currentThread().getContextClassLoader().loadClass(driverClassName).newInstance(); } catch (IllegalAccessException e) { throw new SQLException(e.getMessage(), e); } catch (InstantiationException e) { throw new SQLException(e.getMessage(), e); } catch (ClassNotFoundException e) { throw new SQLException(e.getMessage(), e); } } }