Bug 568952 - PDE resolves dependencies against BREE, not configured JVM
Summary: PDE resolves dependencies against BREE, not configured JVM
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.16   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-19 03:44 EST by Mickael Istria CLA
Modified: 2020-11-19 04:09 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mickael Istria CLA 2020-11-19 03:44:56 EST
In an IDE that *only* has Java 11 configured
Create a PDE plugin project that has JavaSE-1.8 as BREE.
Project references the Java 11 install as JRE (there is no other one).
Add `Import-Package: javax.annotation`
Check classpath: javax.annotation is not part of Resolved Dependencies. The reason seems to be that despite Java 11 is actually configured as JRE for the project, PDE uses that package list from JavaSE-1.8 (taken from a .profile most probably) to do the resolution and assume the package comes from the JRE.
It would be more convenient that PDE resolves dependencies against the *actual* configured JRE instead of against the BREE, as we don't have guarantee of a perfect match in the IDE.
Comment 1 Julian Honnen CLA 2020-11-19 04:09:25 EST
See TargetPlatformHelper::getPlatformProperties.

The new dynamic query behavior for java9+ does use the configured VMInstall, but an existing profile has priority (affects only java 9).

An alternative might be to disable the classpath reordering from bug 567864 for java <=8.