Answer the question
In order to leave comments, you need to log in
How to add MySQL Driver to Jar file?
I build the console server in a jar with maven, but when I run it in the console I get a SQLException
java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/bankassistant?useSSL=false
at java.sql.DriverManager.getConnection(DriverManager.java:689)
at java.sql.DriverManager.getConnection( DriverManager.java:247)
Answer the question
In order to leave comments, you need to log in
Try this Maven plugin here . It will allow you to build the so-called uber-jar.
There is also a plugin for Gradle that collects everything in one jar file https://github.com/johnrengelman/shadow , it is quite convenient and can resolve many conflicts correctly.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question