Bug 3854

Summary: Wrong execution's classpath. (1GEY0W0)
Product: [Eclipse Project] JDT Reporter: David Audel <david_audel>
Component: UIAssignee: Martin Aeschlimann <martinae>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P1    
Version: 2.0   
Target Milestone: ---   
Hardware: All   
OS: Windows NT   
Whiteboard:

Description David Audel CLA 2001-10-10 23:01:58 EDT
Steps to reproduce
	1) create a java project Test1.
	2) add class A in Test1.
	3) create a java project Test2 and add Test1 in build path.
	4) add class B which extends A in Test2.
	5) create a java project Test3.
	6) add class A in Test3.
	7) create a java project Test4 and add Test2, Test3 in build path.
	8) add class C which extends B in Test4.
	9) add a main method with this code :
		public static void main(String[] args){
		   System.out.println(System.getProperty("java.class.path"));
	    }

	result is :
		C:\eclipse\workspace\Test4;C:\eclipse\workspace\Test2;C:\eclipse\workspace\Test1;C:\eclipse\workspace\Test3

	Test1 should not be in classpath



NOTES:

PM (6/7/2001 2:45:34 PM)
	Sounds like a launcher problem (throwing prerequisite projects for free on runtime path?).
	Moving to ITPJUI for investigation.

TM (6/7/2001 19:43:18)
	Yes, prerequisites are put on the runtime classpath recursively. This is necessary.
	Scenario:

	Project P1, contains class C1
	Project p2, contains C2, which uses (in a private field) C1, has P1 on the build path
	P3, contains C3, which uses C2. P3 has P2 on the build classpath

	This compiles correctly (don't need C1 to compile P3).

	Now I launch. C3 calls C2, which calls a method on C2. If P1 isn't on the runtime path,
	we get an exception (class not found).
Comment 1 Martin Aeschlimann CLA 2001-10-16 11:14:16 EDT
moved to 'active'
Comment 2 DJ Houghton CLA 2001-10-24 07:22:45 EDT
PRODUCT VERSION:
build 0.119

Comment 3 Erich Gamma CLA 2001-11-11 05:39:44 EST
pls verify that new implementation handles this case properly
Comment 4 Martin Aeschlimann CLA 2001-11-12 09:34:54 EST
the behaviour is correct, the launch class path must contains all required 
projects, recursivly, that means also the required projects of the required.

Tested on the latest (11107)