Click on “ Add External Jar” and choose the Jar file from Computer. Right click on Project in “Package Explorer” and Build path -> Configure Build Path. Now it’s time to add JDBC library in our project. Inside “ src” folder in Project on “ Package Explorer” create new Java file and name it properly. The name of the class that MySQL Connector/J has changed .mysql.cj.jdbc.Driver. Open Eclipse, Create new Java project from File Menu. If you running Windows 64 bit like me then choose 64 bit Java and 64-bit Eclipse else you may face any issue (issue is debugged already. NOTE: For this tutorial and running code successfully I am going to ask you to download the latest Java from here and the Eclipse editor. To know it go to I am going to use “ cdcol” database (it is example database comes with installation) to demonstrate my code. Since this tutorial is about connecting to a MySQL database, I am not going to create a new database or that stuff, instead, I am going to use databases that come as an example in the MySQL database.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |