title: ClassNotFoundException when using JDBC
body: <p>When I run my code, I get this error: Exception in thread "main" java.lang.ClassNotFoundException: com.mysql.jdbc.Driver; with a stack trace link to line 13 (Highlighted in the code)</p>
  
  <p>I have just started using JDBC and don't know much about it, but I'll go through what I have done so far to get to where I am. As a preliminary, I am using MySQL Workbench and Apache Netbeans 11:</p>
  
  <p>1) Downloaded the .jar connector file</p>
  
  <p>2) Could not find the build path on netbeans 11 and did some research and couldn't find any resources linking to it, so instead used the Driver dropdown through the databases section on the services tab. Now I can see all my SQL databases and tables in my netbeans IDE.</p>
  
  <p>3) Wrote the following code using the 7 steps to connect to the database, establish a connection etc</p>
  
  <pre><code>import java.sql.*;
  
  public class GroundControlToMajorTom {
  
      public static void main(String[] args) throws ClassNotFoundException, SQLException {
  
          String url = "jdbc:mysql://localhost:3306//customers";
          String uname = "root";
          String pass = "";
          String query = "SELECT customer_id FROM customers WHERE customer_id = 1";
  
          Class.forName("com.mysql.jdbc.Driver");
          Connection con = DriverManager.getConnection(url, uname, pass);
  
          Statement st = con.createStatement();
          ResultSet rs = st.executeQuery(query);
  
  
          rs.next();
          String id = rs.getString("customer_id");
  
          System.out.println(id);
  
          st.close();
          con.close();
  
      }
  }
  </code></pre>
  
  <p>4) Run the code and get a ClassNotFoundException. I did a bit of research and it seems to say that I don't have the connection to the actual driver, but I added it in the drivers section of the services for my project?</p>
  
  <p>Any help would be much appreciated my dudes &lt;3</p>