Bug 445426 - Please display actual Java version used inside "JRE System Library" folder name. was: showing Java 1.6, but using 1.8 was: Tycho raises error that Eclipse IDE does not
Summary: Please display actual Java version used inside "JRE System Library" folder na...
Status: CLOSED DUPLICATE of bug 276720
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.4   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-29 22:39 EDT by Paul Verest CLA
Modified: 2014-10-06 10:04 EDT (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 Paul Verest CLA 2014-09-29 22:39:09 EDT
Originally posted on http://stackoverflow.com/questions/26055838/tycho-raises-error-that-eclipse-ide-does-not-cannot-refer-to-a-non-final-variab

The problem is that while developing plugin Eclipse IDE (PDE or JDT) is showing that Java 1.6 is used, while in fact it is using Java 1.8 level.

.classpath has JavaSE-1.6 and I can see that in Eclipse as "JRE System Library [JavaSe-1.6]" folder.

META-INF/MANIFEST.MF already has "Bundle-RequiredExecutionEnvironment: JavaSE-1.6"

Using Eclipse Standard (SDK) 4.4.0
Comment 1 Tobias Oberlies CLA 2014-09-30 05:03:14 EDT
This bug report is on the wrong component and lacks detailed steps to reproduce the problem.
Comment 2 Paul Verest CLA 2014-09-30 06:30:36 EDT
Please help with component selection. I even don't know it is PDE or JDT product.

Steps to reproduce

1) git clone https://github.com/Nodeclipse/nodeclipse-1.git
2) import  org.nodeclipse.enide.gradle as existing project
 (you can browse file online https://github.com/Nodeclipse/nodeclipse-1/tree/master/org.nodeclipse.enide.gradle)
3) In src/org/nodeclipse/enide/gradle/preferences/GradlePreferencePage.java
remove `final` in line 69
 (see online https://github.com/Nodeclipse/nodeclipse-1/commit/1e13f6a1c47ae7cdb5742ed4c3a84b19d999d989)
 Eclipse IDE is to OK with that
4) prom project root run `mvn compile` (or mvn package)
Maven should give error

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:0.19.0:compile (default-compile) on project org.nodeclipse.enide.gradle: Compilation failure: Compilation failure:
[ERROR] D:\Workspaces\Nodeclipse-DEV\nodeclipse-1\org.nodeclipse.ui\src\org\nodeclipse\enide\gradle\preferences\GradlePreferencePage.java:[69]
[ERROR] URL url = new URL(urlString);
[ERROR] ^^^^^^^^^
[ERROR] Cannot refer to a non-final variable urlString inside an inner class defined in a different method
[ERROR] 1 problem (1 error)
Comment 3 Tobias Oberlies CLA 2014-09-30 07:31:43 EDT
After step 2, you can see in the properties of the project that the Java Compiler is using your workspace settings. So you project setup is simply not portable, but will depend on the workspace settings of the workspace it is imported to. So this is a configuration error and not a bug in Eclipse.

BTW, all this information is in the answer to the linked stackoverflow question. Please be more thorough before making claims about something being broken.
Comment 4 Paul Verest CLA 2014-10-01 02:49:50 EDT
I have read and understood answer. I am very thankful for details.

And as Eclipse user for around 10 years, it is clear that the project state was not complete.

But for a new user who would just start using Eclipse, it would be misleading to show "JRE System Library [JavaSe-1.6]" why in fact it is Java 7 or 8.
It is giving not full or wrong information.
User does not need to know where to check whether it is really 1.6.
If the project state is not complete, then there should be warning "!" for that project (and quick fix to generate .settings/* from META-INF/MANIFEST.MF ).

Please display actual Java version used inside "JRE System Library" folder name.
Comment 5 Markus Keller CLA 2014-10-06 10:04:45 EDT

*** This bug has been marked as a duplicate of bug 276720 ***