Press "Enter" to skip to content

How to Add External JAR File in NetBeans Project?

These days I am trying my hands on Java, and I created a simple Java program using NetBeans IDE to connect to the Oracle Database. To do this, I need to add the ojdbc7.jar file to my project so that at runtime Java program can access it. Below I am mentioning the steps to add external JAR file in the NetBeans project.

Adding External JAR file in NetBeans Project

  1. In NetBeans, create a new project or open an existing project in which you want to add the JAR file.
  2. Then click on the menu Run > Set Project Configuration > Customize.
  3. The Project Properties window will open.
  4. In the project properties window, click on the Libraries node at the left Categories pane.
  5. Then on the right side, click on the Run tab and then click on the Add JAR/Folder button and browse the external JAR files you want to add, as shown in the below image. Then click on the OK button.

Project Configuration

After this, you would be able to run your Java program with the support of external JAR files.

See also:

Have you found the answer to your question? If not, you can discuss it with me in the comments section below or join my Q&A community for developers and ask your question. It is FREE.

Vinish Kapoor


Hi, I am a full stack developer and writing about development. I document everything I learn and help thousands of people. is created, written, and maintained by me; it is built on WordPress, and hosted by Bluehost. Connect with me on Facebook, Twitter, GitHub, and get notifications for new posts.

Newest Most Voted
Inline Feedbacks
View all comments