[Bug 476393] New: Eclipse does not detect the Sun Java 1.5 JRE as compatible JRE for any Execution Environment
https://bugzilla.novell.com/show_bug.cgi?id=476393 Summary: Eclipse does not detect the Sun Java 1.5 JRE as compatible JRE for any Execution Environment Classification: openSUSE Product: openSUSE 11.1 Version: Final Platform: x86-64 OS/Version: openSUSE 11.1 Status: NEW Severity: Normal Priority: P5 - None Component: Java AssignedTo: bnc-team-java@forge.provo.novell.com ReportedBy: funtasyspace@yahoo.com QAContact: qa@suse.de Found By: --- User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.0.6) Gecko/2009012700 SUSE/3.0.6-1.4 Firefox/3.0.6 I have multiple Java JREs and SDKs installed on my openSUSE 11.1 (x86-64) system. However, Eclipse somehow doesn't detect the Suns Java 1.5 JRE as compatible JRE for any of the Standard Execution Environments (Window > Preferences > Java > Installed JREs > Execution Environments). But all other JREs like Suns 1.6, the OpenJDK 1.6 and IcedTea 1.7 can be found there. So I guess, there must be something different in the current RPM packages java-1_5_0-sun-1.5.0_update17-1.1 and java-1_5_0-sun-devel-1.5.0_update17-1.1, which causes Eclipse to not detect it as compatible for any Execution Environment. The JREs in those two RPM packages should at least be detected as perfect match for the 'J2SE-1.5' Execution Environment. Maybe there's some specific file or meta information missing in one of the files of those two packages? The Eclipse Wiki (http://wiki.eclipse.org/index.php/Execution_Environments) only says: "When you install a new JRE, Eclipse analyzes the function it provides and identifies the set of Execution Environments it can support." But unfortunately it does not give more detail on how it identifies if a JRE is compatible with a certain Execution Environment, so I can't figure out what's wrong with the current Sun 1.5 packages that ship with openSUSE 11.1. My real problem is, I need to set the Sun 1.5 JRE as the default JRE for the J2SE-1.5 Execution Environment, but can't do this currently on openSUSE 11.1. Reproducible: Always Steps to Reproduce: 1. Install Eclipse. 2. Install sun-1.5.0_update17-1.1 and/or java-1_5_0-sun-devel-1.5.0_update17-1.1 3. In Eclipse go to 'Window > Preferences > Java > Installed JREs', hit the search button and select '/etc/alternatives' as the start folder for the search. Actual Results: 1. Eclipse will find all JREs installed on your system, including the Sun 1.5 JREs. 2. Go to 'Window > Preferences > Java > Installed JREs > Execution Environments' in Eclipse and examine all of the standard Execution Environments. All previously found JREs are listed in at least one of the Execution Environments, but the Sun 1.5 JRE(s), which are not detected as compatible for any of the Execution Environments. Expected Results: Eclipse should list the Sun 1.5 JRE(s) as compatible or perfect match for at least the 'J2SE-1.5' Execution Environment. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=476393
User mvyskocil@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=476393#c1
--- Comment #1 from Michal Vyskocil
My real problem is, I need to set the Sun 1.5 JRE as the default JRE for the J2SE-1.5 Execution Environment, but can't do this currently on openSUSE 11.1.
You can change the JRE for project. Unfortunately I don't know how to change it in existing project, but for a new project the following way works: File/New/Java project - Use a project Specific JRE - if Sun Java5 is not listed, then click on link 'Configure JREs...' and type the /usr/lib(64)/jvm/java-1.5.0-sun-1.5.0 as a JRE HOME (be sure that you have a java-1_5_0-sun-devel installed!) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=476393
User mvyskocil@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=476393#c2
Michal Vyskocil
https://bugzilla.novell.com/show_bug.cgi?id=476393
User funtasyspace@yahoo.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=476393#c3
Jörg Hermsdorf
Eclipse in SUSE cannot use Java 5 as a runtime environment, because it was built with target 1.6, so classes are incompatible with Java 5. I don't want to use Java 5 as the runtime environment for running eclipse. But I want it as the JRE for my project.
You can change the JRE for project. I know I can change it for my project but this doesn't help since I'm using the Maven integration, which will change the JRE again at the next execution. And since I can't specify the vendor of the JRE to use in the Maven pom.xml file for my project, but only the target execution environment the Maven plugin always configures SUN JRE 1.6 for my project because the SUN JRE 1.5 is not detected/listed as a compatible execution environment in eclipse. I want to re-emphasize, I'm not talking about compatible execution environment for running the eclipse IDE, but compatible execution environment for projects with target 1.5. For some reason the Sun JRE 1.5 shipped with openSUSE 11.1 is not detected as compatible for ANY target execution environments, whereas all the other JREs (Sun 1.6, OpenJDK, IcedTea, ...) are.
Maybe you have to tweak a Compiler compliance level to 1.5 in Project/Properties/Java compiler, because it was decreased to 1.4 after switch to JRE 1.5. This is done automatically by the Maven plugin. I just rechecked and confirmed, that it is set to 1.5 for my project. But what eclipse does is like: OK, I need a compatible JRE for 1.5... let me see what I find. OK, let's use Sun 1.6... well, this is not a perfect match, but the best I have available. Why is this? Well the Sun JRE 1.5 which would be a perfect match (and is installed on my system) is not recognized by eclipse neither as perfect nor compatible for 1.5 targets.
So this is not an invalid bug. It works as expected with eclipse on Windows XP, but not on openSUSE 11.1. And I don't feel this is a problem with eclipse on openSUSE 11.1, because all other available JREs are detected and mapped correctly... just the supplied Sun JRE and JDK versions 1.5 are not. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=476393
User mvyskocil@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=476393#c4
Michal Vyskocil
participants (1)
-
bugzilla_noreply@novell.com