Are pure Java SQLiteJDBC drivers really clean?

I am making a decision for the embedded database in the upcoming Java servlet application. I reached two final rivals: SQLite with the "pure Java" drivers from SQLiteJDBC and Java DB (aka Derby).

Here is my killer criterion: the application should run on any OS that supports Java, in particular, we have the Solaris, CentOS, Windows x86, and Windows x64 hosts that all will need to run the application. And the installation should include nothing more than copying the war file to the deployment folder of the target server and providing the rest of the server (which is nothing more than just copying the zip to the target server, and then allowing the server to unzip and run the application). There should not be any problems with the embedded binaries during the installation process, and there is no additional installation logic. (Actually, this is not my requirement, this is a company for all servlet applications, but I like it).

I know Derby (Java DB) meets the above criteria. I did it once or twice. But I really like the architecture of the single SQLite file and the fact that the SQLite community is about 20 times bigger than Derby. I also have a fear that Oracle will one day kill Derby, since now they have something like five competing database products under their umbrella, and this cannot go on forever. Derby is likely to be the first victim when the household starts.

So, I looked at SQLiteJDBC, which claims that there are "pure Java" JDBC drivers for SQLite. Now I would understand that β€œpure Java” means that there are no OS dependencies or additional libraries, that you can run the driver in any JVM on any OS. So, I go and get a jar file with pure Java drivers. And, being curious, I look into it. Then I notice that it contains 4 files in the root with the .lib extensions, as shown below:

Linux-amd64.lib
Linux-x86.lib
mac-universal.lib
win-x86.lib

So what's up with that? Are they similar to their own libraries for the named OS? If so, can I assume that this pure Java driver will only work on the platform with the corresponding lib file in the bank? If so, I, unfortunately, will have to take SQLite from the list of applicants, because winX64 and Solaris are our most important OS here.

Or maybe I misinterpreted, and the pure Java driver is really pure Java, and it will work in any JVM?

All reviews are welcome !!!

Thanks in advance, John

+7
sqlite sqlitejdbc
source share
2 answers

If I understand correctly, SQLiteJDBC itself is a type 4 JDBC driver, but still requires some built-in binary integration with the host operating platform, since SQLite is still a C-based solution and does not have a network integration / protocol level such as SQL * As far as I know, Net is for Oracle. The SQLiteJDBC homepage mentions the implementation of "NestedVM" for any language supported by GCC, so it seems possible to deploy a cross platform wherever there is a GCC runtime. However, there was no mention of Solaris.

+2
source share

http://www.xerial.org/trac/Xerial/wiki/SQLiteJDBC - provides a clean implementation of Java, although it uses available .lib files where possible, as they are faster.

+3
source share

All Articles