Help please deal with the connection to the database. you need to make an interface and that when you click a button, the program connects to the database, but I cannot understand what needs to be written in the button code. Mysql Connector downloaded, but I do not know the path to it needs to be specified in CLATHPATH?
1 answer
Mysql-connector must be included in the jar file after compilation, or specified in the classpath at startup.
To use it in development, enable it as a dependency in your IDE. An example of connecting jdbc with mysql:
https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-usagenotes-connect-drivermanager.html
Connection dependencies:
In Eclipse: https://stackoverflow.com/questions/3280353/how-to-import-a-jar-in-eclipse
In IDEA: https://stackoverflow.com/questions/1051640/correct-way-to-add-external-jars-lib-jar-to-an-intellij-idea-project
|