How to add the relative path Eclipse external jar package

When carried out in the eclipse java programming, often you need to reference external jar package. The use of a relative path reference copy jar package can greatly facilitate the construction of java, so that java project from one path to another path not modified when the outer jar package of the trouble. Here is how to add a relative path jar package Method:

1. Establish lib directory under the appropriate java project directory, all you need to reference external jar are placed in the directory;

2. Re-import project, the project added to the lib directory structure;

3. Right-click on the appropriate java project, right-src folder, find the build path, to find configure build path, and then point to open the Add JARS, find lib directory on the inside, you can load external jar packets inside. If you select a jar package Add Extener JARS This will add the absolute path, so rather inconvenient, if the project to others, it will compile and run error

Guess you like

Origin www.cnblogs.com/aziji/p/11564351.html
Recommended