Answer the question
In order to leave comments, you need to log in
What and how should I connect to work with sqlite3 in java?
Need to work with sqlite3. I try to connect to the database, but errors.
public static void connect_to_db ( ) {
try {
Class.forName ( "org.sqlite.JDBC" );
System.out.println ( configPath );
conn = DriverManager.getConnection ( "jdbc:sqlite:" + configPath );
} catch ( SQLException e ) {
System.out.println ( e.getMessage() );
} catch ( ClassNotFoundException e ) {
System.out.println ( "class.forName: " + e.getMessage ( ) );
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question