Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 439426

Summary: Compile error when importing Tycho in an Eclipse workspace which has a pre-1.7 JDK registered
Product: z_Archived Reporter: Tobias Oberlies <t-oberlies>
Component: TychoAssignee: Project Inbox <tycho-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: laeubi, mistria
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Tobias Oberlies CLA 2014-07-11 07:11:13 EDT
The tycho-p2-director-plugin correctly specifies a compiler src&target level of 1.5. So when this project is imported into Eclipse, m2eclipse selects the J2SE-1.5 execution environment for the project.

Still, the project has an optional dependency to JavaSE-1.7 (since bug 429809) and hence needs to be compiled against an 1.7 JDK. This can be achieved by manually editing the classpath after import. We could check in the .classpath file to prevent the need for this manual step, but this is not good as long as m2eclipse keeps overwriting these changes on "update project" (bug 405661).
Comment 1 Tobias Oberlies CLA 2014-07-11 07:12:24 EDT
Note that this problem on occurs if the execution environment J2SE-1.5 is matched to an 1.5 or 1.6 SDK. People who only have registered 1.7 or newer are not affected by this problem.
Comment 2 Christoph Laeubrich CLA 2020-07-07 13:42:42 EDT
@Tobias as time has passed by and tycho is moved on to Java 11 can you tell if this is still an issue?
Comment 3 Mickael Istria CLA 2020-07-07 13:44:04 EDT
I don't think we care about so old Java versions anyway ;)