I\'m using the sqlite4java library in my Java application and it works just fine when I\'m running it in Eclipse. But when I build the runnable JAR and try to run it on Mac
Unlike many other dependencies, sqlite4java uses additional files based on the host platform to interface with SQLite databases. When Eclipse packages the required libraries, it only copies the sqlite4java.jar file, but not the other required files.
You might think that the solution would be to export the runnable JAR file with the option "Copy required libraries into a sub-folder next to the generated JAR" and manually add the missing files, but alas, that doesn't seem to work either.
The best solution I've found is actually the most Mac-friendly one. Instead of exporting as a runnable JAR file, you export as a Mac OS X application bundle! To do that in Eclipse:
You'll now have a Mac OS X application that properly loads sqlite4java.