Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7868949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T01:09:24+00:00 2026-06-03T01:09:24+00:00

I need to have one lib-project (myLib), and several apps projects that should use

  • 0

I need to have one lib-project (myLib), and several apps projects that should use source from myLib. I have troubles with configuring Eclipse.

Desired projects tree is something like that:

myProject
   /src
      ..some files..
   /bin

myLib
   /src
      ..some files..
   /bin

Now i am trying to configure myProject‘s classpath, to make it use source from myLib/src.

If i add link source using Eclipse’s GUI (UPD: I added link to the source folder this way: right-click on the project -> Build path -> Configure build path -> go to “Source” tab -> press button “Link Source…” -> specify path to the myLib/src and folder name: “lib_src“), then i got absolute path to myLib/src, i.e. the following:

myProject/.classpath:

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="src" path="src"/>
    <classpathentry kind="src" path="lib_src"/>
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
    <classpathentry kind="output" path="bin"/>
</classpath>

myProject/.project:

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
    <name>data_manager__gui</name>
    <comment></comment>
    <projects>
    </projects>
    <buildSpec>
        <buildCommand>
            <name>org.eclipse.jdt.core.javabuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
    </buildSpec>
    <natures>
        <nature>org.eclipse.jdt.core.javanature</nature>
    </natures>
    <linkedResources>
        <link>
            <name>lib_src</name>
            <type>2</type>
            <location>/HERE/IS/FULL/PATH/TO/myLib/src</location>
        </link>
    </linkedResources>
</projectDescription>

As I already said, I need to avoid absolute paths. So, I need path myLib/src to be specified like that: ../myLib/src

Then i tried to specify path to myLib/src manually, but if I add in .classpath the line like that:

<classpathentry kind="src" path="../myLib/src"/>

Then Eclipse thinks that .classpath is totally broken, and reset it to the following blank default:

<classpath>
    <classpathentry kind="src" path=""/>
    <classpathentry kind="output" path="bin"/>
</classpath>

Then I tried to change path in the .project file, but it seems like relative paths are totally not supported in .project file: Eclipse can’t find my myLib/src, I tried many variants.

How to achieve this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T01:09:26+00:00Added an answer on June 3, 2026 at 1:09 am

    I am not sure how you added the project reference, but in my case, the path is relative.

    This is the .classpath of a project called Adarsh which references another Java project called raroscope.

    <?xml version="1.0" encoding="UTF-8"?>
    <classpath>
        <classpathentry kind="src" path="src"/>
        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
        <classpathentry combineaccessrules="false" kind="src" path="/raroscope"/>
        <classpathentry kind="lib" path="geocoder-java-0.9.jar" sourcepath="geocoder-java-0.9-sources.jar"/>
        <classpathentry kind="lib" path="commons-logging.jar"/>
        <classpathentry kind="lib" path="gson-2.1.jar"/>
        <classpathentry kind="lib" path="commons-lang.jar"/>
        <classpathentry kind="output" path="bin"/>
    </classpath>
    

    You should be right-clicking on your project myProject, select Java Build Path > Projects and add myLib (raroscope here) as is shown below.

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have several solutions, each containing multiple projects, that all need to reference a
i need to have one project on asp.net mvc 1 but i want to
I need to make the program which have one form that contains PNG image
I have a master project that's using a fairly standard source tree approach +
I have a project that contains several submodules, that communicate using some objects that
I have several files comprising a tomcat web application that I need to import
I have a solution with 2 projects cira_lib and md5_test. One project (cira_lib) is
I have one dictionary I need to save into a plist. The paletteDictionary always
I have one SubjectTabActivity and i need to show listview on this activity. But
I have one tabview which contain two different tab(subject and chapter) and i need

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.