How to access SQLite 2.X Database from JDBC ( under Windows)?

Problem

JDBC driver available from http://www.zentus.com/sqlitejdbc/ is not compatible with SQLite 2.x databases.

Solution

1. Download driver from http://www.ch-werner.de/javasqlite/
2. Extract the zip file & copy sqlite_jni.dll into c:\windows\system32
3. Add sqlite.jar to you classpath
4. Following is how your java code should look like :

String driverClass = "SQLite.JDBCDriver";
String connectionString = "jdbc:sqlite:/C:/tools/SQLite/cdr.db";
Class.forName(driverClass);
conn = DriverManager.getConnection(connectionString);

Take a note of  "/" infront of "C:"