Java examples for JDBC:Sqlite
Connect to sqlite database
import java.sql.*; public class SQLiteJDBC{ public static void main(String args[]){ Connection c = null;// www . ja va 2 s .co m try{ Class.forName( "org.sqlite.JDBC"); c = DriverManager.getConnection("jdbc:sqlite:test.db"); } catch(Exception e){ System.err.println(e.getClass().getName() + ": " + e.getMessage()); System.exit(0); } System.out.println("Opened database successfully"); } }