Home » Online Computer Education » Learn Fundamentals of Java Programming “Adding the mysql connector JAR to the NetBeans Libraries in Java Programming ” Lesson 28

Learn Fundamentals of Java Programming “Adding the mysql connector JAR to the NetBeans Libraries in Java Programming ” Lesson 28

Adding the mysql connector JAR to the NetBeans Libraries

Before writing the Java program to connect to the database, we have to also add the mysql connector JAR file to the Libraries in our project. The following steps show you how to do just that:
Step1: Under the Projects tab, right click on the Libraries node and select ADD JAR/ Folder… (Figure 1.11g).

Java fundamentals database connectivity 7
Step 7: In the Add JAR/Folder dialog box that appears, navigate to the your NetBeans Installation Folder. Then navigate to the /ide/modules/ext folder and select the mysql-connector-java-5.1.23-bin.jar file. Click on Open (Figure 1.11h).

Java fundamentals database connectivity 8

Now, expand the Libraries node (click on the + sign on its left), the mysql connector jar should have been added to the NetBeans Libraries (Figure 1.11i).

Java fundamentals database connectivity 9

About

The main objective of this website is to provide quality study material to all students (from 1st to 12th class of any board) irrespective of their background as our motto is “Education for Everyone”. It is also a very good platform for teachers who want to share their valuable knowledge.

Leave a Reply

Your email address will not be published. Required fields are marked *