java cant find my sqlite file
i placed my sqlite file on src/Database folder in my project.
and in my code, i have this...
String filePath = "\\Database\\glacier.sqlite";
connect = DriverManager.getConnection("jdbc:sqlite:"+getClass().getResource(filePath));
stat = connect.createStatement();
res = stat.executeQuery("select value from controls where command == 'A'");
A = res.getInt("value");
but it errors and says,
java.sql.SQLException: [SQLITE_ERROR] SQL error or missing database (no such table: controls)
this is so terrible i have controls table in my sqlite!
:confused: please help me solve this
Re: java cant find my sqlite file
The database you are referring is in your source directory, but your runtime is most likely operating off of class files in another directory (typically named bin) - be sure your databases between the two are in sync