Create .jar of an eclipse project that uses Sqlite DB
I am having problems creating the .jar for my project. I am able to create the .jar file but then it doesn't run, it doesn't crashes neither, it just doesn't work and I have no idea why.
Since I don't know very much about .jars, here I list some of the suspicious things that may be the problem:
The projects uses a sqlite db; there is a db folder inside the project which contains it "/Project/db/adsiDB.sqlite"
The .jar for the Sqlite jdbc is added as an external jar in the java build project
The .jar for the Sqlite jdbc is in the main folder of the project ( /Project/sqlitejdbc-v056 )
When I export the project via eclipse, the .jar is expo开发者_StackOverflow中文版rted to the desktop, and that's it. It doesn't create a folder with the .jar and other files, it's just the .jar and it seems rare to me.
OK, so that's all. I don't know if one of this things may be the reason or if there are any other suggestions.
It's maybe late for this question but what I will say can help others.
When you are exporting your project, try to export with ohters library. I imagine that you must have the sqlite driver in your project so you should export with all libraries.
At the exporting choice it's better to select runnable jar files.
Try running the jar file on your desktop with:
java -jar yourjarfilename.jar
精彩评论