title: ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver, how to fix it
body: <p>it gives exception of java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver</p>
  
  <pre><code>int row=0;
      try {
          Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
          Con=DriverManager.getConnection("jdbc:odbc:MSDB");
          stmt=Con.createStatement();
          String sql="select c_name from candidates";
          RS=stmt.executeQuery(sql);
          while(RS.next())
          {
              String name=RS.getString("c_name");
              c1.addItem(name);
              row++;
          }
         }
      catch (Exception ex) {
          JOptionPane.showMessageDialog(null,"" + ex);ex.printStackTrace();
         }
  </code></pre>