0

I'm making a system that integrates java and sql, but when connecting it to the database, the error 'java.lang.ClassNotFoundException: com.mysql.jdbc.Driver' appears, and I imagine that it's because I don't being able to add the sql connector in my project, because the 'library' tab does not appear, in which I should implement the connector. In its place, only a folder called 'Dependencias' appears and in which nothing can be added. I'm new to these languages ​​and I don't understand much.

I searched the internet but I didn't find anyone with this same problem of not appearing in the library

jarlh
  • 42,561
  • 8
  • 45
  • 63
  • 2
    Sounds like you've got a Maven project, so you need to use 'Dependencias' and add the correct one for MySql, which will be some form of connector-j – g00se Aug 15 '23 at 17:19
  • https://maven.apache.org/guides/getting-started/ – Basil Bourque Aug 15 '23 at 17:38
  • https://mvnrepository.com/artifact/com.mysql/mysql-connector-j – Basil Bourque Aug 15 '23 at 17:39
  • https://en.wikipedia.org/wiki/Apache_Maven#Project_Object_Model – Basil Bourque Aug 15 '23 at 17:41
  • https://netbeans.apache.org/wiki/MavenBestPractices.html – Basil Bourque Aug 15 '23 at 17:42
  • 1
    This is a very common question here. Even if you _"searched the internet but I didn't find anyone with this same problem"_, there are dozens of questions about _"ClassNotFoundException: com.mysql.jdbc.Driver"_ when using Maven on Stack Overflow! [Use this search as a starting point](https://stackoverflow.com/search?tab=newest&q=%22java.lang.ClassNotFoundException%3a%20com.mysql.jdbc.Driver%22%20is%3aquestion%20maven&searchOn=3), and refine it to zero in on your problem. Also follow the link on _MySQL Connector/J_ that Basil provided. – skomisa Aug 15 '23 at 23:07

0 Answers0