Here you can find the source of hasDriver()
protected static void hasDriver() throws SQLException
//package com.java2s; //License from project: Open Source License import java.sql.SQLException; public class Main { protected static void hasDriver() throws SQLException { try {/*from w w w .ja v a2s . c om*/ Class.forName("com.mysql.jdbc.Driver"); } catch (ClassNotFoundException ex) { throw new SQLException("Invalid Driver!!Please check this driver...."); } } }