Here you can find the source of getUrlConnection()
public static Connection getUrlConnection() throws SQLException
//package com.java2s; // Licensed under the Apache License, Version 2.0 (the "License"); import java.sql.SQLException; import java.sql.Connection; import java.sql.DriverManager; import java.util.*; import java.util.logging.*; public class Main { static String url; public static Properties props; public static Connection getUrlConnection() throws SQLException { Connection connection = null; checkprops();// w w w. j a v a 2s . c o m Logger.global.log(Level.FINE, "DriverManager.getConnection(url)"); connection = DriverManager.getConnection(url); Logger.global.log(Level.INFO, "DriverManager.getConnection(url) passed"); Logger.global.log(Level.FINE, "==============\n\n"); return connection; } public static Connection getUrlConnection(String newUrl) throws SQLException { Connection connection = null; checkprops(); Logger.global.log(Level.FINE, "DriverManager.getConnection(newUrl) newUrl = " + newUrl); connection = DriverManager.getConnection(newUrl); Logger.global.log(Level.INFO, "DriverManager.getConnection(newUrl) passed mewUrl = " + newUrl); Logger.global.log(Level.FINE, "==============\n\n"); return connection; } static void checkprops() throws SQLException { if (props == null) throw new SQLException("Error: t4jdbc.properties is null. Exiting."); } }