Click here to Skip to main content
15,889,200 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have successfully created a desktop software that requires database for usage. I created the project and database with netbeans using the embedded derby driver. I have clean and build the software it's now a jar file. I have a package installer software (Advanced Installer) which helps to convert the jar file the an .exe file

The Question is:
The database I created which is located in my user.home directory how can I attached that file to the application so when ever the user install my software the database file will be added to the user.home directory too (because that's where I told java to locate the database) please I really need help my software is useless without database

What I have tried:

I have been trying to add the database file to the application jar files but if I do that java wouldn't know where to locate the database because i have written code to locate database at the user.home directory (C:\Users\john\mydatabase). I can write code to locate the database where the software will be saved (C:\Programm Files (x86)\MySoftwear but that directory will only work on windows which is not ok because I want the application to work on both windows and Mac Linux e.t.c
Posted
Updated 3-Jul-18 4:52am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900