Here you can find the source of runSQLExecute(String sql, Map
public static boolean runSQLExecute(String sql, Map<String, String> config)
//package com.java2s; //License from project: Apache License import java.sql.*; import java.util.Map; public class Main { public static boolean runSQLExecute(String sql, Map<String, String> config) { try {// ww w . j a v a2s . com Statement statement = getStatement(config); return statement.execute(sql); } catch (Exception e) { throw new RuntimeException("Failed to execute query:" + sql, e); } } private static Statement getStatement(Map<String, String> config) throws InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException { Class.forName(config.get("driver")).newInstance(); Connection connection = DriverManager.getConnection(config.get("url"), config.get("user"), config.get("password")); return connection.createStatement(); } }