title: java jdbc:sqlite no suitable driver. classpath issues i think
body: <p>I'm running ubuntu. I installed sqlite3 and java via the synaptic package manager, and downloaded the sqlitejdbc-v056 jar.</p>
  
  <p>My sqlite is working fine. I've written some java code that compiles, but wont run. I used ant to compile the stuff and that worked fine once i put the jar in the same place as build.xml.</p>
  
  <p>When i try to run the program (by saying java program) it says: java.sql.SQLException: No suitable driver found for jdbc:sqlite:test.db</p>
  
  <p>here's some of the offending code:</p>
  
  <pre><code> Class.forName("org.sqlite.JDBC");
   Connection conn = DriverManager.getConnection("jdbc:sqlite:test.db");
  </code></pre>
  
  <p>From what I've read thus far it's probably a problem with my classpath, i'm not really sure how to fix it though. here's what i've tried:</p>
  
  <ol>
  <li>put the .jar in the same directory as my compiled program main stuff</li>
  <li>put the .jar in the same directory as my compiled class that uses the sql stuff</li>
  <li>tried using the -classpath option when calling java from the terminal. I tried this with relative addressing first, then an absolute path</li>
  <li>3 but with wildcards, ie .../*.jar</li>
  <li>sudo gedit /etc/environment. there was no CLASSPATH so i put this in: CLASSPATH="<em>.jar:/home/sheena/Java/lib/</em>.jar:.:.*.jar:/home/sheena/Java/lib/" </li>
  </ol>
  
  <p>I feel like i'm out of options.</p>
  
  <p>on a separate but related note, i also really struggled to get javac to see the jar while i was compiling, i couldn't get the ant stuff about the classpath right either. This part isn't as urgent as the stuff above but here's a little bit of build.xml:</p>
  
  <pre><code>&lt;path id="files-classpath"&gt;  
      &lt;fileset dir="lib/" &gt;  
          &lt;include name="*.jar"/&gt;  
      &lt;/fileset&gt;  
  &lt;/path&gt; 
  </code></pre>
  
  <p>...</p>
  
  <p>
              
                   
                   
                  <br>
                  
              
        </p>
  
  <p>those are just some of the things i tried.</p>
  
  <p>Any ideas would be much appreciated, the internet has surprisingly little info on this topic from what i can see...</p>