davidjanmercado / sqlite-jdbc

Automatically exported from code.google.com/p/sqlite-jdbc
Apache License 2.0
0 stars 0 forks source link

SQLite always being loaded in pure Java mode on Mac OS 10.8 & Oracle JDK 1.7 #34

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Run "mvn test -Dtest=org.sqlite.TransactionTest" on Mac OS 10.8 with OpenJDK 
1.7
2. Observe the "running in pure-java mode" debug message
3. Work around it by running "mvn test -Dtest=org.sqlite.TransactionTest 
-Dorg.sqlite.lib.name=libsqlitejdbc.jnilib"

What is the expected output? What do you see instead?

We should run in native mode by default. The problem is that 
System.mapLibraryName("sqlitejdbc") is returning "sqlitejdbc.dylib", but the 
packed library is "sqlitejdbc.jnilib". It appears that at some point the 
OpenJDK people changed the suffix that mapLibraryName returns (see another 
observation of this at http://code.google.com/p/snappy-java/issues/detail?id=39 
).

What version of the product are you using? On what operating system?

Jar straight from maven: sqlite-jdbc-3.7.2.jar

JDK:
java version "1.7.0_09"
Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode)

MacBook Pro
Retina, Mid 2012
Processor  2.6 GHz Intel Core i7
Memory  16 GB 1600 MHz DDR3
Software  OS X 10.8.2 (12C3006)

Please provide any additional information below.

Original issue reported on code.google.com by mprud...@gmail.com on 7 Dec 2012 at 9:04