Here you can find the source of deleteDatabase()
public static void deleteDatabase() throws SQLException
//package com.java2s; import java.io.File; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.sql.Statement; public class Main { public static final String JDBC_URL = "jdbc:sqlite:C:/Users/timothyi/mta/database/development.sqlite3"; public static void deleteDatabase() throws SQLException { if ("sqlite".equals(JDBC_URL.substring(5, 11))) { deleteDatabaseSQLITE();// w w w .j av a2s .c o m } else { deleteDatabaseH2(); } } public static void deleteDatabaseSQLITE() throws SQLException { File f = new File(JDBC_URL.substring(12)); f.delete(); } public static void deleteDatabaseH2() throws SQLException { Connection conn = DriverManager.getConnection(JDBC_URL, "sa", ""); Statement stmt = conn.createStatement(); try { stmt.execute("DROP ALL OBJECTS DELETE FILES"); // stmt.execute("SHUTDOWN"); TODO: db files get removed if this line // is uncommented } finally { stmt.close(); conn.close(); } } }