I changed my computer so I restarted entire process of connecting JDBC with DB using Driver. To shorten the story, I will post screenshots. Hope someone can help, as I have no idea what the problem is..
Step 1: I downloaded driver and stored it here:
Step 2: I went to InteliJ in File/ProjectStructure/Libraries and added exact same .jar file.
Step 3: After that I went to make a Connection with my db. It is located here:
Step 4: Lastly I coded following statement:
try {
Connection connection = DriverManager.getConnection("jdbc:sqlite:C:\\Users\\Stefan\\people.db");
} catch (SQLException throwables) {
throwables.printStackTrace();
}
What I get is no suitable driver found message. I double checked everything and still have no clue what the problem is.
Add the dependency if you're using maven / gradle.
Example for maven:
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.32.3.2</version>
</dependency>
and for gradle:
compile group: 'org.xerial', name: 'sqlite-jdbc', version: '3.32.3.2'