I am trying to have my java application auto create a sqlite database file on a Mac. Running under Eclipse, the database auto creates itself just fine. The problem is that when it is run as an Application (.app file) on the Mac, I get:
opening db: 'MyDatabase.sqlite': permission denied
The .getSQLState is null and the .getErrorCode is 0. If the database file already exists, it opens just fine without any problem. The connection string is:
jdbc:SQLite:MyDatabase.sqlite
The SQLite jar version is 3.8.10.1
Within the Mac application itself, I tried making the MacOS directory within the application read/write/execute but apparently if "fixes" itself and makes it read-only.
Is there anyway on the Mac to create a sqlite database within an application?
Aucun commentaire:
Enregistrer un commentaire