What is the difference between the Maven MySQL connector and the official MySQL connector JAR file?

QuestionsWhat is the difference between the Maven MySQL connector and the official MySQL connector JAR file?
sethbeckerman5 Staff asked 8 years ago

Recently I was working with JDBC, and all code which uses JDBC were working perfectly.
After some time I started using JDBC again to refresh all concepts. The problem is, when I wrote my new program at that time, it gave me ClassNotFoundException. Everything in my code was perfect. I also added the external JAR file of the MySQL connector. The exception was ClassNotFoundException com.mysql.jdbc.Driver.
I tried different IDEs to run that code, but it gave me the same error. But then I tried to import this MySQL connector from the Maven repository and all the exceptions were cleared and executed perfectly.
Previously I was using this MySQL connector. Also both connectors versions were the same which was 8.0.11. I have really less amount of knowledge of Maven.
Why did the MySQL connector JAR file from Maven work perfectly and the other didn't?


View on Stack Overflow