Bug 248466

Summary: Cannot launch if build path contains a ".." entry
Product: [Eclipse Project] JDT Reporter: Jerome Lanneluc <jerome_lanneluc>
Component: DebugAssignee: Curtis Windatt <curtis.windatt.public>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: darin.eclipse
Version: 3.4   
Target Milestone: 3.5 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 57732    
Attachments:
Description Flags
fix to jdt.launching
none
new tests for relative classpaths none

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.