title: Even after adding mysql Jconnector to CLASSPATH, getting java.lang.ClassNotFoundException(Not using IDE)
body: <p>I'm trying to connect with mysql from java and these are my CLASSPATH variable values which I've set using GUI in windows(control panel->system->advanced system settings->environment variables).</p>
  
  <blockquote>
    <p>.;.;.;.;.;C:\PROGRA~2\JMF21~1.1E\lib\sound.jar;C:\PROGRA~2\JMF21~1.1E\lib\jmf.jar;C:\PROGRA~2\JMF21~1.1E\lib;E:\Face_rec\FaceDetect-java\lib\facedetect-openimaj.jar;<strong>C:\Program
    Files (x86)\MySQL\Connector J 5.1.27\mysql-connector-java-5.1.27-bin.jar</strong></p>
  </blockquote>
  
  <p>The bolded one is the classpath that I'm dealing with. Even though all different paths are separated by semicolon and the <strong>mysql-connector-java-5.1.27-bin.jar</strong> has been added to CLASSPATH i'm getting this error when I run my code.</p>
  
  <blockquote>
    <p>java.lang.ClassNotFoundException: com.sql.jdbc.Driver.</p>
  </blockquote>
  
  <p>this is the part of the code. And I've imported,</p>
  
  <pre><code>import java.awt.*;
  import java.sql.*;
  import java.sql.Connection;
  import java.sql.DriverManager;
  import java.sql.SQLException;
  import javax.swing.*;
  import java.awt.event.*;
  import java.util.*;
  import javax.swing.JTextField;
  import javax.swing.ImageIcon;
  
  ok.addActionListener(new ActionListener()
          {
              public void actionPerformed(ActionEvent ae)
              {
                  String test=jf1.getText();
                  String testa=jf2.getText();
                  String n;
                  String m;
                  try
                  {
                      Class.forName("com.mysql.jdbc.Driver");
                      Connection con=DriverManager.getConnection
  
  ("jdbc:mysql://localhost/authentication?"+"user=root&amp;password=letmein");
                      PreparedStatement p=con.prepareStatement("Select * from authentication.admin where 
  
  id Like '"+test+"%'");
                      ResultSet rs=p.executeQuery();
                          rs.next();
                          n=rs.getString("Username");
                          m=rs.getString("Password");
                          con.close();
                      if(n.equalsIgnoreCase(test) &amp;&amp; m.equalsIgnoreCase(testa))
                      {
                              JOptionPane.showMessageDialog(null,"Your username and password is 
  
  correct");
                      }
                      else
                      {
                              JOptionPane.showMessageDialog(null,"Your username or password is 
  
  incorrect");
                      }
  
                  }
                  catch(Exception es)
                  {
                      System.out.println(es);
                  }
  
              }
          });
  </code></pre>
  
  <p>Update:<strong>I'm not using any IDE(Eclipse of netbeans). I'm using only command prompt.</strong> 
  Please help me to solve this.</p>