Sunday, August 26, 2007

Using SQLite with Java on Intel Mac OS X


Step 1:
Click here to Download the SQLite Mac OS X 10.4 JNI wrapper (thanks Tim Anderson)

Step 2:
Extract the sqlite_jni.macosx.zip file; and copy these 2 files into the /Library/Java/Extensions folder
- libsqlite_jni.jnilib
- sqlite.jar

Step 3:
compile the test.java file that come with the zip file
> javac test.java

Step 4:
run it with "java test", you will found these exception message

Unable to load sqlite: java.lang.UnsatisfiedLinkError: /Library/Java/Extensions/libsqlite_jni.jnilib:
Exception in thread "main" java.lang.UnsatisfiedLinkError: version
at SQLite.Database.version(Native Method)
at test.main(test.java:72)

No comments:

XML Master Cert Group

Google Groups
XML Master Certification
Visit this group