Community
Participate
Working Groups
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
This bug report is on the wrong component and lacks detailed steps to reproduce the problem.
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)
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.
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.
*** This bug has been marked as a duplicate of bug 276720 ***