-1

I having some problems; I have Completed My Java Database Project in net-beans. I also use Java DB or Derby, mins embedded database for back-end. I run my Project and it is successfully runs and it works properly with derby database. I set the database location in my project.

Then, I have created a Project JAR file. This jar file present on my project sub-folder that is, dist folder and then I have run it. And it work but I have coped the jar file and paste another directory it runes but is not connect with derby database and also copied whole project and paste another directory. Yet it does not work, only jar file is worked but database is not work.

I also want to create an exe file of my project and run on another computer without having any kind of software on user machine. How I can build the database in my project. how I can attach database file in my project. Can you tell me, what I do? And also help if, I am use a MySQL then I have need all above requirements. What will happen to me?

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
kusama
  • 389
  • 3
  • 13
  • *"I also want to create an exe file of my project and run on another computer without having any kind of software on user machine."* Given that a `.exe` is Windows specific, what do you intend doing for OS X and *nix? BTW - is the DB 'read only' or can the user update/add/delete information from it? – Andrew Thompson Feb 21 '15 at 07:22
  • BTW (2) The best way to deploy a Java desktop application is using [Java Web Start](http://stackoverflow.com/tags/java-web-start/info). – Andrew Thompson Feb 21 '15 at 07:24

1 Answers1

1

Looks like jar file generated by you doesn't include dependencies.

To generate a jar file with dependencies while building a jar: Select "Extract required libraries into generated JAR" as you do the export.

enter image description here

Select "Extract required libraries into generated JAR" as you do the export.

You can use this runnable jar file as executable.

Abhijeet Dhumal
  • 1,799
  • 13
  • 24