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.