2

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 exported 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.

Yi Jiang
  • 49,435
  • 16
  • 136
  • 136
Inaki
  • 21
  • 2

2 Answers2

1

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.

attin83
  • 115
  • 3
  • 8
0

Try running the jar file on your desktop with:

java -jar yourjarfilename.jar
ditkin
  • 6,774
  • 1
  • 35
  • 37