title: How to solve "java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver" at runtime?
body: <p>There is a problem at runtime with this code which is :</p>
  
  <blockquote>
  <pre><code>java.lang.classNotFoundException: oracle:jdbc:driver:OracleDriver
  </code></pre>
  </blockquote>
  
  <p>but another program of same JDBC driver are run properly but this JDBC driver is found a exception in java applet. So please help me for this problem. </p>
  
  <p><em>I'm new in Java.</em></p>
  
  <pre><code>import java.awt.*;
  import java.awt.event.*;
  import java.applet.*;
  import java.sql.*;
  import java.io.*;
  
  /*&lt;applet code="EmpDetails" width=300 height=500&gt;&lt;/applet&gt;*/
  
  public class EmpDetails extends Applet implements ActionListener{
  TextField firstName, lastName, userId, pass, email, phone;
  Button submit,cancel;
  String msg = "";
  
  public void init(){
  
      setLayout(new GridLayout(10,2,0,30));
  
  
      Label fname = new Label("First Name : ");
      Label lname = new Label("\nLast Name : ");
      Label uid = new Label("User Id : ");
      Label pas = new Label("Password : ");
      Label emailid = new Label("Email Id : ");
      Label ph = new Label("Phone : ");
  
      firstName = new TextField(10);
      lastName = new TextField(10);
      userId = new TextField(16);
      pass = new TextField(16);
      email = new TextField(30);
      phone = new TextField(12);
      pass.setEchoChar('*');
  
      submit = new Button("Submit");
      cancel = new Button("Cancel");
  
      add(fname);
      add(firstName);
  
      add(lname);
      add(lastName);
      add(uid);
      add(userId);
      add(pas);
      add(pass);
      add(emailid);
      add(email);
      add(ph);
      add(phone);
      add(submit);
      add(cancel);
  
      firstName.addActionListener(this);
      lastName.addActionListener(this);
      userId.addActionListener(this);
      pass.addActionListener(this);
      email.addActionListener(this);
      phone.addActionListener(this);
      submit.addActionListener(this);
      cancel.addActionListener(this);
      }
      public void actionPerformed(ActionEvent ae)
      {
          String str = ae.getActionCommand();
          if(str.equals("Submit"))
          {
                  try{
                      Class.forName("oracle.jdbc.driver.OracleDriver");
                      String url = "jdbc:oracle:thin:@localhost:1521:XE";
                      String id = "system";
                      String passw = "root";
  
                      Connection con = DriverManager.getConnection(url , id , passw);
  
                      Statement st = con.createStatement();
  
                      String u,fn,ln,ps,em,pn;
                      u = userId.getText();
                      fn = firstName.getText();
                      ln = lastName.getText();
                      ps = pass.getText();
                      em = email.getText();
                      pn = phone.getText();
                      String urld = "INSERT INTO EMPDETAILS(id,firstname,lastname,email,password,phone)" + "values" + "('" + u + "','" + fn + "','" + ln + "','" + em + "','" + ps + "','" + pn + "')";
                      st.executeUpdate(urld);
                      con.close();
                      st.close();
                      msg = "Recode added successfull ";
                  }
  
                  catch(Exception e){ msg = e.toString();}
          }
  
          else{
              msg = "No any data added";
  
          }
          repaint();
      }
      public void paint(Graphics g){
          g.drawString(msg,6,300);
  
  
      }
  }
  </code></pre>