Problem finding SQLite JDBC driver
So I am trying to use SQLite. I have placed both sqlite3.exe and the JDBC driver (sqlitejdbc-v056.jar) into my current directory.
Within java I place the following code:
try{
Class.forName("org.sqlite.JDBC");
Connection con = DriverManager.getConnection("jdbc:sqlite:mydata.db ");
Statement stmt = con.createStatement();
stmt.executeUpdate("create table mytable(x INTEGER PRIMARY KEY, name);");
stmt.close();
con.close();
}catch(Exception e){}
Now, apparently it is not finding the driver. I have tried many strategies and I still have problems. Does anyone know what is going on?
I also tried setting the classpath among other things but it still did not work. If you have any tips for me they would be greatly appreciated.