Where to place SQLite 3 database for use in a Java Project in Eclipse

My Eclipse Java project path is as follows:
~/workspace/PayrollApp/src/org/username/payrollapp/payroll.db

I had placed the SQLite database file payroll.db in the above path, and found it was not getting used when I ran the Java program.

Upon inspecting the contents of ~/workspace/PayrollApp, I found that payroll.db was there with 0 bytes. That implied that the file needs to be in that location.

All I then did, was to copy the payroll.db file from
~/workspace/PayrollApp/src/org/username/payrollapp/payroll.db to ~/workspace/PayrollApp/payroll.db

The program then worked correctly with the database.

Leave a Reply

  

  

  

Blue Captcha Image
Refresh

*

September 2019
M T W T F S S
« Aug    
 1
2345678
9101112131415
16171819202122
23242526272829
30