Bug 536233 - Relative paths in .classpath does not work
Summary: Relative paths in .classpath does not work
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.7.3   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-25 04:49 EDT by John Bester CLA
Modified: 2022-08-15 11:41 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Bester CLA 2018-06-25 04:49:57 EDT
There is a very strange phenomenon when you try to define a relative class path entry in a project. I have inherited a project previously developed in Netbeans where the folder structure looks like this:
ProjectRoot
ProjectRoot/Libraries # Contains all jars
ProjectRoot/ProjectA # Contains .classpath, .project, src etc
ProjectRoot/ProjectB # Contains .classpath, .project, src etc

If I use ProjectRoot (or a folder above it) as the workspace folder, then I cannot get to jars using relative paths. Let me give an example:
If I use Path="Libraries/somelib.jar" in classpath, it looks for the jar in 
ProjectRoot/ProjectA/Libraries.
If I use Path="../Libraries/somelib.jar" it looks for the jar in a folder above the workspace folder.

If you have a more complex workspace where ProjectA and ProjectB is not directly under the workspace root, then the problem is even more complex. 

Expected behaviour:
If Path="Lib/x.jar" points to "Lib" subfolder of a project root, then "../Lib" should point to the Lib folder of the direct parent of the project root.
Comment 1 Eclipse Genie CLA 2020-06-17 00:50:47 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 2 Eclipse Genie CLA 2022-08-15 11:41:13 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.