Here you can find the source of createTable(String database, String sqlScript)
public static void createTable(String database, String sqlScript)
//package com.java2s; //License from project: Apache License import java.sql.Connection; import java.sql.DriverManager; import java.sql.Statement; public class Main { public static void createTable(String database, String sqlScript) { Connection c = null;//from w w w . j a v a2 s.c o m Statement stmt = null; try { Class.forName("org.sqlite.JDBC"); c = DriverManager.getConnection("jdbc:sqlite:" + database); stmt = c.createStatement(); stmt.executeUpdate(sqlScript); stmt.close(); c.close(); } catch (Exception e) { System.err.println(e.getClass().getName() + ": " + e.getMessage()); System.exit(0); } } }