JDBC ClassNotFoundException
<p>I want to use JDBC i added Mysql driver to classpath as below :</p>

<p>^<a href="https://i.stack.imgur.com/pKuf9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pKuf9.png" alt="enter image description here"></a></p>

<p>But even that  i get this error :</p>

<blockquote>
  <p>java.lang.ClassNotFoundException: com.mysql.jdbc.Driver   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:425)     at
  sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)     at
  java.lang.ClassLoader.loadClass(ClassLoader.java:358)     at
  java.lang.Class.forName0(Native Method)   at
  java.lang.Class.forName(Class.java:191)   at
  dao.JdbcTest1.main(JdbcTest1.java:23)</p>
</blockquote>

<p>This is my code :</p>

<pre><code>public static void main(String[] args) {
    String url = "jdbc:mysql://localhost:3306/bd_italiano";
    String utilisateur = "root";
    String motDePasse = "";

    Connection connexion = null;
    try{
        Class.forName("com.mysql.jdbc.Driver ");
        connexion = DriverManager.getConnection( url, utilisateur, motDePasse );
        DatabaseMetaData dbMetaData = connexion.getMetaData();

        System.out.println("Type de la base de données : " + dbMetaData.getDatabaseProductName());
        System.out.println("Veresion de la base de données : " + dbMetaData.getDatabaseMajorVersion());
        System.out.println("Nom du driver : " + dbMetaData.getDriverName());
        System.out.println("Nom du user de la base de données : " + dbMetaData.getUserName());

    } catch(Exception e) {
        e.printStackTrace();
    } finally {
        if(connexion!=null)
            try {
                connexion.close();
            } catch (SQLException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
    }
}
</code></pre>

<p>Pleas help me</p>