简体   繁体   中英

How do I relative reference a library in Eclipse?

在此处输入图片说明

I have been asking a lot of questions about LTI-CIVIL and I have figured a solution. For that, I need to relative reference the native library for LTI. Is it possible to relative reference a library in Eclipse ?

If not, what is the workaround ?

Ok. This answer will work for you. I know you are not using ant, but you can still specify a CLASSPATH in the manifest of your jar. Include dot in the CLASSPATH, and put the LTI jar in the same folder. That means you can zip up your jar and the LTI jar together at the same outermost level.

If you want the directory structure of your other question, you can put ../putLTIhere in your CLASSPATH.

This answer will give you more details:

How to build a distributable jar with Ant for a java project having external jar dependencies

You can right-click on the project, then click "properties" -> Java Build Path -> Add Jars

That should do the trick :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM