title: SQLite Exception Path does not exist
body: <p>I am trying to connect an already existing SQLite database to my java project, as a temporary solution for testing a simple log-in dialog. Here is my connector class:</p>
  
  <pre><code>import java.sql.*;
  import javax.swing.*;
  
  public class SQLite_login_connector {
  //Initializes global connection variable (unused until now!)
  Connection conn_log = null;
  
  public static Connection logindb_connection(){
  
      //Simple try catch block that prints error trace log in a JOptionPane if runtime error occurs.
  
      try{
          Class.forName("org.sqlite.JDBC");
  
          Connection conn_log = DriverManager.getConnection("jdbc:sqlite:/SQLite/ISRSMS_Login.sqlite");
          JOptionPane.showMessageDialog(null, "Connection Successful!");
          return conn_log;
  
      }   catch(Exception e){
          JOptionPane.showMessageDialog(null, e);
          return null;
      }       
    }
   }
  </code></pre>
  
  <p>My SQLite database is located in a folder within my project folder:</p>
  
  <p><img src="https://i.stack.imgur.com/6xHEq.png" alt="Project folder with SQLite database"></p>
  
  <p>When I try running my connector class, it throws the following exception:</p>
  
  <p><img src="https://i.stack.imgur.com/6QxwG.png" alt="JMessageDialog with Eception e printed"></p>
  
  <p>For me it looks as if it assumes that the folder which contains my database is located on my F: drive, as opposed to my root project in my local repository. I have tried putting the database into my src folder, as well as into a new resource folder all-together. Every time it throws the same exception. Why does it do that?</p>