Re: Problems on OS X 64 bit

172 views
Skip to first unread message

Igor Sereda

unread,
Jun 27, 2012, 4:14:08 AM6/27/12
to sqlit...@googlegroups.com
Hello Will, 

The binary libraries (.JNILIB) must be present on the filesystem (not packaged in a JAR). You need to make sure you've got your OS X binary in the file system, and it is either in the same directory as sqlite4java.jar, or use java.libarary.path or sqlite4java.library.path system property to specify the directory where the binary is located.

Hope this helps!
Igor

On Tuesday, June 26, 2012 9:53:24 PM UTC+4, Will Herrmann wrote:
I have a project in Eclipse that makes use of sqlite4java. I loaded it up as an external JAR file and it works great when I run the project in in Eclipse. The only problem is that when I export project into a JAR file and run it, I get the following error:

[-91] cannot load library: java.lang.UnsatisfiedLinkError: no sqlite4java-osx-x86_64 in java.library.path

I've tried all of Eclipse's export options for library handling (Extract into JAR, Package into JAR, and Copy into Sub-folder next to JAR), but I get the same error regardless.

I saw that a similar problem was addressed in this thread, so I tried your advice. Typing "java -jar sqlite4java.jar -d " into the Terminal resulted in "Unable to access jarfile sqlite4java.jar"

Will Herrmann

unread,
Jul 9, 2012, 10:34:31 AM7/9/12
to sqlit...@googlegroups.com
Is this only a requirement when I am creating the JAR file or will other users of the JAR file also require sqlite4Java in the file system? I really hope that it is the first, as I'd hate to require my users to install software like that (especially since most of them wouldn't understand what it was).

-Will

Igor Sereda

unread,
Jul 9, 2012, 3:09:09 PM7/9/12
to sqlit...@googlegroups.com
Will, this is a requirement whenever you need to work with SQLite, because Java so far cannot load native libraries from anywhere except file system. For your OS X users, you can create a .app folder and put .JNILIB into Resources folder. (See details about packaging a Java app as an .app on the Internet.)

Kind regards,
Igor

Will Herrmann

unread,
Jul 9, 2012, 7:41:00 PM7/9/12
to sqlit...@googlegroups.com
Thank you very much, Igor! You can tell I'm new to all this, so I appreciate you helping me out.

-Will
Reply all
Reply to author
Forward
0 new messages