My project has the following directory structure:
Projects
|---------A
|---B
|---C
Project C uses src files of B. In eclipse I import project A and classpath file present under A contains B's and C's source folder as classpathentry src. Thus, even when I am on any of C's java file which uses variables declared in B's java file, I am able to navigate to them using Ctrl+Click
on the variable.
Now my requirement is to move out C to the level of project A:
Projects
|--------A
|---B
|--------C
Now A and C will have different classpath files. When in C's classpath file I try to give relative path of B's source folder. I get the following error in eclipse:
Illegal entry in '.classpath' of project 'B' file: Path for IClasspathEntry must be absolute
I tried out creating a jar of B's source file and giving the classpathentry of the jar in C's classpath file. But, with this approach , I loose out being able to navigate to B's java file from C's java file using Ctrl+click
.
I cant give absolute path because the code is shared and different systems will have different path.
So, how do I specify my project C's dependency on B's source folder in .classpath file so that I retain the navigation through Ctrl+Click