title: jdbc to oracle 11g xe. class not found error
body: <p>I've installed oracle 10g express edition. I need to connect it to java program, used jdbc. I have ojdbc6_g.jar and set its class path. I am getting class not found error.Code is given below. Please help</p>
  
  <pre class="lang-java prettyprint-override"><code>import java.sql.*;
  
  public class OraThin {
  
      public static void main(String[] args) {
          try {
              Class.forName("oracle.jdbc.driver.OracleDriver");
              Connection con = DriverManager.getConnection("jdbc:oracle:thin:@//Terminator:1521/CLRExtProc", "scott", "tiger"); //hostname=Terminator, sid=CLRxtProc
              Statement s = con.createStatement();
              s.execute("insert into student values('PQR',10)");
              s.close();
              con.close();
          } catch (Exception e) {
              e.printStackTrace();
          }
      }
  }
  </code></pre>
  
  <p>The stack trace: </p>
  
  <pre><code>java.lang.ClassNotFoundException:oracle.jdbc.driver.OracleDriver at 
  java.net.URLClassLoader$1.run(URLClassLoader.java:366) at 
  java.net.URLClassLoader$1.run(URLClassLoader.java:355) at 
  java.security.AccessController.doPrivileged(Native Method) at 
  java.net.URLClassLoader.findClass(URLClassLoader.java:354) at 
  java.lang.ClassLoader.loadClass(ClassLoader.java:423) at 
  sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at 
  java.lang.ClassLoader.loadClass(ClassLoader.java:356) at 
  java.lang.ClassLoader.forName0(Native Method) at OraThin.main(OraThin.java:6) 
  </code></pre>