Eclipse. Copy the JAR file to the project

How to include (NOT ONLY link) JAR file in an existing project? I added it using the Project properties - Build path - add external jar's. But when I export my project and then import it to another computer, this library was missing.

+4
source share
3 answers

Drag it into your project so that it appears in the project like any other file.

Right-click the jar in the project view and add the build path.

+7
source

Put your banks in the directory of your project, for example, yourproject / lib, to access external libraries through a relative path. Then use the "Add JARs" option to add the jar to create the path, as in the eboix link.

+2
source

You want to export the project as an archive (Export β†’ General β†’ Archive File), and then import the project as an existing project (Import β†’ General β†’ Existing projects in Workspace). Thus, the project will be identical to the exported version, and the whole configuration will be correct.

Oh, and do what other people offer and copy the Jar file to the project, so you don’t need to refer to it as an external Jar file (and all in one place).

+1
source

Source: https://habr.com/ru/post/1387890/


All Articles