3 Ways to import external jar packages under Eclipse

Source: Internet
Author: User

Using Eclipse to develop applications, and the use of third-party jar packages, every time the introduction of the jar package is a big problem, not only the location of the jar package is often unclear, but also a waste of time. With this in mind, I've listed three common ways to introduce jar packages, the first of which is the common way of doing things that we use most often, and the second and third are quick versions of how they work.

Here's the first way: basic steps

Right-click Project Properties, select Property, select Java Build Path in the list on the left of the popup dialog box, as shown in: Select Add External JARs to add a third-party reference jar package individually (and optionally multiple, but in the same folder).


The operation in this way is universal, but each time a project is created, the jar package is reintroduced and the jar package is not reusable.

The second way: User Jar-Package

Right-click the project properties, select the property, select Java Build Path in the list on the left of the popup dialog box, pop Up the dialog box as shown here, select "Add Library", Pop Up the dialog box as shown, select "User Library", then select-"Next"

In the dialog box that appears, you can select a user-defined library that has already been created, or you can select "New" in the Libraries dialog box to create a new user-defined library.

In the user-defined library that you want to create, enter the name of the new custom library, such as

Then add the required jar packages for the new library

After you have added the user-defined library as described above, you can later reuse these defined users library libraries to save time for development.

3. How to operate the Express version: folder import type

In the project, create a new folder (Eg:ibatis_jar), as shown in this example, the Ibatis_jar folder is created and the third-party jar packages that are required for project development are copied to the folder.

Select the jar package you want to add to your project, and right-click on "Build Pathàadd to build Path" so that the jar package is successfully imported into the project.

Three ways to import jar packages are simpler and more reusable than the second, and when we look for the required jar packages on different machines, we can copy them directly.

There is a temporary understanding of the Eclipse import jar package, and as the experience accumulates, the difference between the various ways in which Eclipse introduces jar packages will be understood more deeply!

3 Ways to import external jar packages under Eclipse

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.