TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

Eclipse Tutorials

Add an External Library to an Eclipse Project

Eclipse Tutorials

Introduction

External library is packaged and distributed in JAR file format in Java projects. Jar may have many related individual java classes that we can reuse in our project. The easiest way to add a dependency of the project is using a build tool file like Maven or Gradle.

Sometimes you may find yourself in a situation to use an external jar file which are not hosted as a Maven repository. For example, an internal project jar file that your project depends on. In this tutorial, we will learn how to use jar files in other projects.

An external JAR file can be added to your project so that you might reuse the classes.

Steps to add a jar file

Locate or download the corresponding .jar file to your local machine.

To add the functionality provided by the external library to your projects, simply do the following:

Launch Eclipse

Right-click on the project, and select Properties

Select Java Build Path on the left, and then the Libraries tab.

Now, click the Add External JARs… button.

 

 

Locate the folder to which library should be added.

Locate and select the .jar file you just downloaded, and then click Open

Click OK to close the dialog box.

Java Build Path

Verification

When you open the project folder, you see Referenced Libraries in the project explorer, and upon expanding this item, you see the package jar listed.

Once you add the jar file, you cam import and use the classes in your project.

 

https://www.testingdocs.com/export-a-jar-file-in-eclipse

 

—

Eclipse Tutorials

Eclipse Tutorials on this website can be found at:

https://www.testingdocs.com/eclipse-tutorials

For more details on the Eclipse IDE, visit the official website

https://www.eclipse.org

Related Posts

Download Eclipse Installer

Eclipse Tutorials /

Install Eclipse using Installer on Windows 10

Eclipse Tutorials /

Eclipse Che Overview

Add Eclipse SpotBugs Install URL

Eclipse Tutorials /

Install SpotBugs Eclipse Plugin

Eclipse File Import

Eclipse Tutorials /

Import Maven Project in Eclipse

Eclipse marketplace online catalog

Eclipse Tutorials /

Eclipse Marketplace

‹ Launch Eclipse IDE on Windows› Eclipse IDE Configuration

Recent Posts

  • MS Access Data Types
  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • Build & Run CLion Project
  • Create New CLion C Project on Windows
  • Configure CLion Toolchains on Windows
  • Launch CLion IDE on Windows
  • Activate CLion IDE
  • CLion IDE for C/C++ Development

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com

Go to mobile version