I am working on a simple program in java, which I use to read and write a few things in one SQLITE database, located within the directory I have the jar file. To access the database and a settings file, I use the
String wd = System.getProperty("user.dir");
String dbName = "jdbc:sqlite:"+wd+"\\"+sqliteDataNae;
c = DriverManager.getConnection(dbName);
Long story short, I have made a jar file wrapping all libraries in and tested it in Windows where everything works fine. I get my data stored in my database. Not exception at all!
Then I transfer all my files in a rar file to an ubuntu (14) hyperv virtual machine. I use the terminal to go to my directory where I have unzipped everything, and run:
java -jar myJar.jar
The script starts running, I get my println and the setting are all loaded (hence no issue reading the settings txt file - located in the same directory as the database = no directory issue),
The problem is that I get an sqlite exception [SQLITE_ERROR] SQL error or missing database (no such table: User)
.
However, I open my database (using SQLite Database Browser) and the table exists.
Is there any logical explanation for this? and is there any solution?