Community
Participate
Working Groups
It would also be useful to be able to specify relative paths in a .classpath file, that branches out from the .classpath file location (project location) in the actual windows file system, rather than just the workspace file system. Presently we have to use classpath variables such as... <classpathentry kind="var" path="VIEW_ROOT/Build/jh2.0/javahelp/lib/jh.jar"/> Where we would like to be able to just use... <classpathentry kind="var" path="../../Build/jh2.0/javahelp/lib/jh.jar"/> which would not require the setting of the VIEW_ROOT variables for eclipse to find required resources. This is very useful in setting up eclipse projects and sharing/importing Team Project Sets. The setting of one variable may seem trivial, but to developers new to eclipse or indeed programming in general, this step is just one more unnecessary hurdle. May I even suggest a new 'kind' so that eclipse knows to look from the .classpath file location, such as 'local'.
Interesting ideas, but not for 3.0
*** Bug 166572 has been marked as a duplicate of this bug. ***
Reopening to consider for 3.5
Will investigate for 3.5M3
Created attachment 113459 [details] Proposed fix and regression tests
Cannot release until bug 248466 is fixed.
Entered bug 248583 for the JDT/UI work.
Fix and test released for 3.5M3. Note that one can use this feature by editing the .classpath for now. UI work can be followed in bug 248583.
To clarify, note that the ".." is supported for library entries and variable values. A container can also have a library entry with a "..". Other classpath entry paths (such as source entries) cannot have a "..".
Seems to work for '..' inside variable path or library path. This doesn't work: <classpathentry kind="var" path="HOME/../../../../java_tools/lib/als.jar"/>. If this is intended, then verified for 3.5M3 using I20081026-2000.
(In reply to comment #10) > Seems to work for '..' inside variable path or library path. > This doesn't work: > <classpathentry kind="var" > path="HOME/../../../../java_tools/lib/als.jar"/>. > > If this is intended, then verified for 3.5M3 using I20081026-2000. Yes this is intended. ".." in variable path is not supported. ".." is supported in variable value.
Hi, are there any plans to implement relative source paths as well?
(In reply to comment #12) > Hi, are there any plans to implement relative source paths as well? > Sorry no plan to support relative source paths. Please enter a separate bug and provide a patch if this is important to you.
Although the current status of this bug is Fixed/Verified, I think it should be re-opened because the current implementation has limited use. The lib paths are relative to the workspace location. This makes the feature useless to developers who wish to use relative paths for projects aren't contained in their workspaces. It would be much more useful if the paths were relative to the project. As an example, consider a workspace rooted at /home/user1/workspace. The workspace references a project rooted at /development/component/project1. There is a directory of jars that project1 depends on at /development/component/lib. The logical use for the relative path here would be to define an lib entry in project1 such as <classpathentry kind="lib" path="../lib/some.jar">. The expectation would be that this would reference /development/component/lib/some.jar. However, the current implementation would resolve this to /home/user1/workspace/lib/some.jar.