SQLiteJDBC is a Java JDBC driver for SQLite. It runs using either a native code library 100% Pure Java driver based on NestedVM emulation.

Both the pure driver and the native binaries for Windows, Mac OS X, and Linux x86 have been combined into a single jar file.


The current version is v056, based on SQLite

That should be everything you need.


  • 2009-12-03: There will be a new version soon, just dealing with some test suite issues. I created anew mailing list, though the Google Group has mysteriously reappeared since then.
  • 2009-06-09: Upgrade to SQLite and add a 64-bit binary for OS X.
  • 2009-01-14: Note that the mailing list for SQLite JDBC is currently unavailable as the Google Group unexpectedly disappeared.

Getting Started

Read the usage page for the full story.

import java.sql.*;

public class Test {
  public static void main(String[] args) throws Exception {
    Connection conn =
    Statement stat = conn.createStatement();
    stat.executeUpdate("drop table if exists people;");
    stat.executeUpdate("create table people (name, occupation);");
    PreparedStatement prep = conn.prepareStatement(
      "insert into people values (?, ?);");

    prep.setString(1, "Gandhi");
    prep.setString(2, "politics");
    prep.setString(1, "Turing");
    prep.setString(2, "computers");
    prep.setString(1, "Wittgenstein");
    prep.setString(2, "smartypants");


    ResultSet rs = stat.executeQuery("select * from people;");
    while (rs.next()) {
      System.out.println("name = " + rs.getString("name"));
      System.out.println("job = " + rs.getString("occupation"));

Run with:

java -cp .:sqlitejdbc-v056.jar Test

There are also some details on date handling and custom functions.

Keeping Informed

To be informed when a new release is made, I recommend subscribing to the freshmeat project for this driver. Every release I make goes up there immediately with a short summary of the changes. They provide a free email service with these details and don't load you up with spam.

There's a mailing list.

Released under a BSD license.

Version control for this project is handled with git. Get the source from github.


저작자 표시 비영리 변경 금지
크리에이티브 커먼즈 라이선스
Creative Commons License

'Study > --Java' 카테고리의 다른 글

BufferedReader vs Scanner  (0) 2011.09.12
Failed to create the java virtual machine  (0) 2011.09.12
java sqlite jdbc eclipse build path  (0) 2011.07.14
Java sqlite jdbc  (0) 2011.07.14
[JAVA] atoi, iota  (5) 2011.07.07
Flex 와 Java XMLsocket을 사용하기  (0) 2010.08.19
java.net.BindException: Address already in use  (0) 2010.08.19

+ Recent posts

티스토리 툴바