No suitable driver found for jdbc mysql?

后端 未结 6 1393
抹茶落季
抹茶落季 2020-12-03 23:28

I am trying to write a program to connect to a MySQL database in eclipse, but I get the error \"java.sql.SQLException: No suitable driver found\".

The java

6条回答
  •  攒了一身酷
    2020-12-03 23:57

    For all but the most trivial applications the CLASSPATH environment variable is NOT used. Normally the libraries are include in the Class-Path entry in the manifest of the jar, or in the -cp option of the java commandline.

    In this case you need to add the MySQL JDBC driver to the buildpath of your Eclipse project.

提交回复
热议问题