| Summary: | Non-Exported jars are imported | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Marvin Fröhlich <eclipse> |
| Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
| Status: | VERIFIED INVALID | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | jarthana, paul.brady, satyam.kandula, stephan.herrmann |
| Version: | 3.7.1 | ||
| Target Milestone: | 3.8 M6 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
|
Description
Marvin Fröhlich
(In reply to comment #0) > Build Identifier: 20110916-0149 > > I have two projects. > Project A imports some jars j.jar and k.jar. > Nothing but project A's source is exported under "Order and Export". This is in the "Java Build Path" preferences, right? So the effect is, that the compiler will not let a project importing A refer to classes from j.jar or k.jar. These checks happen at compile time. > Project B imports project A. > The following command executed from within B, which is run through a launch > configuration: > System.err.println( System.getProperty( "java.class.path" ) ); > includes j.jar and k.jar from project A. This, in contrast, happens at runtime. Now for classes in A to correctly be loaded and their code executed they'll likely depend on j.jar and k.jar. So without those jars on the classpath, A would be broken. Please let me know if I misunderstood anything. Otherwise I'd say everything works exactly as intended. Ok, I think, you opened my eyes. Thanks. Should be alright then. *** Bug 372292 has been marked as a duplicate of this bug. *** Verified for 3.8M6 |