How can I add build path items to Eclipse 3.5 using relative paths?

Viewed 16452

Eclipse 3.5 added support for relative buildpath/classpath items, yet I cannot seem to find a graphical way to add relatively pathed items. The example in new and noteworthy (search the page for 'relative', about 40% of the way down) seems to indicate that I have to manually edit the .classpath file. Am I just missing something?

Edit 2015: Updated link as it had went away. To preserve the "new and noteworthy" indefinitely, here's a screenshot of the mentioned section.

enter image description here

9 Answers

Simple. without all dialogs and menus.

In your .project file add the path to the real file, like this. Mine is on ../libs/GoogleAdMobAdsSdkAndroid-4.1.1/GoogleAdMobAdsSdk-4.1.1.jar
so i changed to PARENT-1-PROJECT_LOC/libs/...

<linkedResources>
    <link>
        <name>libs/GoogleAdMobAdsSdk-4.1.1.jar</name>
        <type>1</type>
        <locationURI>PARENT-1-PROJECT_LOC/libs/GoogleAdMobAdsSdkAndroid-4.1.1/GoogleAdMobAdsSdk-4.1.1.jar</locationURI>
    </link>
</linkedResources>

and in .classpath i use

<classpathentry kind="lib" path="libs/GoogleAdMobAdsSdk-4.1.1.jar"/>

as the link to the lib

Eclipse links the resource to project and uses it without copping the file Just like Mike Jones answer above but without any dialogs

Best for multiple apps

Related