Java SE Project adding jar packages using relative paths __java

Source: Internet
Author: User

In Java Engineering, an external jar package was added to the Java build Path-->libraries-->add external jars, assuming that the jar package is placed in the project's Lib directory, assuming the project name is MyProject, That is, the jar package under D:\myproject\lib\*.jar, and then compile the project correctly, the entire project copied to another computer, import the project, often there will be engineering errors (engineering compilation is correct), prompted the message that project ' MyProject ' is Missing required library: ' D:\myproject\lib\aa.jar ', that is, according to the original project in the path of the jar did not find the Aa.jar package, how to solve the jar package absolute path problem.

Workaround:

1th: Directly copy the jar package into the project and then right key to the jar bundle, build path-----ADD Build Path

2nd: Copy jar package to real Java Engineering directory; Add the jar package you just copied in Java build path-->libraries-->add Jars

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.