Bug 248466 - Cannot launch if build path contains a ".." entry
Summary: Cannot launch if build path contains a ".." entry
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.5 M3   Edit
Assignee: Curtis Windatt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 57732
  Show dependency tree
 
Reported: 2008-09-24 12:34 EDT by Jerome Lanneluc CLA
Modified: 2008-10-06 16:49 EDT (History)
1 user (show)

See Also:


Attachments
fix to jdt.launching (1.93 KB, patch)
2008-09-25 11:38 EDT, Darin Wright CLA
no flags Details | Diff
new tests for relative classpaths (5.00 KB, patch)
2008-09-25 11:39 EDT, Darin Wright CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jerome Lanneluc CLA 2008-09-24 12:34:25 EDT
I20080923-0800

With the fix for bug 57732, one will be able to have entries on the build path that are relative to the project, e.g. "..\..\workspace\org.eclipse.jdt.core\bin"

However a launch configuration that is created from this build path now contains invalid path. Attempting to run such launch config results in an error dialog that says for example

The archive: ../../workspace/org.eclipse.jdt.core/bin which is referenced by the classpath, does not exist.
Comment 1 Jerome Lanneluc CLA 2008-09-24 12:37:24 EDT
I believe you should use IJavaProject#findPackageFragmentRoots(IClasspathEntry) for each raw entry that is not a CPE_SOURCE. Then for each IPackageFragmentRoot you can get the resolved path by calling getPath().
Comment 2 Darin Wright CLA 2008-09-25 11:38:23 EDT
Created attachment 113471 [details]
fix to jdt.launching

Patch for runtime classpath resolution.
Comment 3 Darin Wright CLA 2008-09-25 11:39:07 EDT
Created attachment 113472 [details]
new tests for relative classpaths

New debug tests. Cannot be released until JCORE support is released.
Comment 4 Darin Wright CLA 2008-09-25 11:40:07 EDT
Released fix to jdt.launching so jcore can proceed. Will release tests once jcore fix is released.
Comment 5 Darin Wright CLA 2008-09-26 08:30:02 EDT
Released tests to HEAD.
Comment 6 Darin Wright CLA 2008-09-26 08:30:18 EDT
Please verify, Curtis.
Comment 7 Curtis Windatt CLA 2008-10-06 16:49:18 EDT
Verified.