Now that you have created your database, its time to create the JAVA application that will use your database!
The Java project consists of 9 classes! You can download the Java Project(Source Codes) from here.
If you are using Eclipse, just copy the whole folder in the Eclipse Directory. If you are using any other IDE, you will have to copy paste each class manually!
Each class will have a connection code, that will connect your Java application to your SQL database. It will look like this:
There is just one step left now!
You need two library files in your java project now! They are very important, without these libraries your Java app can not connect with your SQL database!
Download the libraries from here.
After downloading the files, you need to import them in your project. This how you do it(on Eclipse):
- Right-click on the project(i.e. your java project name)
- click on properties
- click on Java Build Path
- now click on Add External JARs and add both of the libraries!
If you face any problems, leave a comment below!cheers!