Skip to content

Sqldroid on non android platforms

ergouser edited this page Aug 29, 2012 · 3 revisions

A compatibility layer is now available for SQLDroid that uses JNA to access the underlying C interface of SQLite and provide JDBC driver that should run on any platform supported by JNA.

Once the compatibility layer and the JNA jar are included, coding SQLDroid is the same on Android or other platforms.

The motivation for this is lack of support for Blobs in other SQLite JDBC drivers and problems with Date/Time fields in the Xerial JDBC driver.

Using JNA provides a rapid, reliable and widely support mechanism for accessing C code from Java. However, there is a performance penalty for using JNA which may make SQLDroid unsuitable for very high performance applications.

The Jar to support this is now available in the downloads. You will need both the sqldroid jar and the compatibility jar. JNA and Log4J jars are also required.

JNA is here: https://github.com/twall/jna/downloads

Log4J is here: http://logging.apache.org/log4j/2.x/download.html (The code is built against log4j-1.2.11 so if you discover problems, please downgrade and start an issue).

Clone this wiki locally