Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Ganymede: Annoying JRE warnings
Ganymede: Annoying JRE warnings [message #331383] Thu, 04 September 2008 08:20 Go to next message
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
Hello,

we are just considering to switch from Eclipse 3.3.2 to Eclipse 3.4.

Unfortunately we stumble across an annoying warning in the Package
Explorer View for *every* plug-in project. Reason for this is,
that most of our developers are working against Java 1.6, but our
RCP product is supposed to run *at least* on Java 1.5 systems (therefore
we specify a compiler compliance level of Java 1.5).

The problem is, that the MANIFEST.MF (on Ganymede) insists on specifying
a "Bundle-RequiredExecutionEnvironment" element (if not doing so, we get
another warning anyway). Most naturally, we tried to solve this problem
by specifying:

Bundle-RequiredExecutionEnvironment: J2SE-1.5

This is no solution, because then we still get a warning:

"The JRE container on the classpath is not a perfect match to the
'J2SE-1.5' execution environment"

This is understandable, because the class path still referred to
an Java 1.6. No problem, just let Eclipse do the auto fix for you,
which means it modifies the Java build Path (Tab Libraries, "JRE System
Library") to an execution environment: "J2SE-1.5 (jre1.6.0_07)".

You wont belief it, but Eclipse still warns on every such adapted
plug-in project with:

"Build path specifies execution environment J2SE-1.5. There are no JREs
in the workspace strictly compatible with this environment."

At this point I have no longer any idea how to solve this problem.
Note that this is very important for us to get rid of these warnings,
because projects which permanently are in warning state are unmanagable:
You never now, to what the warning referes to and if there is another
important warning to fix, you probably do not see it anymore.

Does anyone have an idea how to solve this? I hope that the only
solution will *not* be to install *both* a Java 1.5 and a Java 1.6
runtime, because this would not accepted by our company rules.

Side note: In the .settings folder of the projects I found in one of
the .prefs files the entry

org.eclipse.jdt.core.incompatibleJDKLevel=warning

but changing this value from 'warning' to 'ignore' did not make any
observable difference :-(

Thanks in advance,

Daniel Krügler
Re: Ganymede: Annoying JRE warnings [message #331389 is a reply to message #331383] Thu, 04 September 2008 14:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: zx.code9.com

Daniel Krügler wrote:
> Hello,
>
> we are just considering to switch from Eclipse 3.3.2 to Eclipse 3.4.
>
> Unfortunately we stumble across an annoying warning in the Package
> Explorer View for *every* plug-in project. Reason for this is,
> that most of our developers are working against Java 1.6, but our
> RCP product is supposed to run *at least* on Java 1.5 systems (therefore
> we specify a compiler compliance level of Java 1.5).
>
> The problem is, that the MANIFEST.MF (on Ganymede) insists on specifying
> a "Bundle-RequiredExecutionEnvironment" element (if not doing so, we get
> another warning anyway). Most naturally, we tried to solve this problem
> by specifying:
>
> Bundle-RequiredExecutionEnvironment: J2SE-1.5
>
> This is no solution, because then we still get a warning:
>
> "The JRE container on the classpath is not a perfect match to the
> 'J2SE-1.5' execution environment"

In your preferences, find execution environments and you can set
whatever your JRE you're using as a perfect match.

Can you also post a .classpath file from one of these projects here?

Cheers,

~ Chris
Re: Ganymede: Annoying JRE warnings [message #331390 is a reply to message #331383] Thu, 04 September 2008 14:52 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

Daniel Krügler wrote:
> Hello,
>
> we are just considering to switch from Eclipse 3.3.2 to Eclipse 3.4.
>
> Unfortunately we stumble across an annoying warning in the Package
> Explorer View for *every* plug-in project. Reason for this is,
> that most of our developers are working against Java 1.6, but our
> RCP product is supposed to run *at least* on Java 1.5 systems (therefore
> we specify a compiler compliance level of Java 1.5).
>
> The problem is, that the MANIFEST.MF (on Ganymede) insists on specifying
> a "Bundle-RequiredExecutionEnvironment" element (if not doing so, we get
> another warning anyway). Most naturally, we tried to solve this problem
> by specifying:
>
> Bundle-RequiredExecutionEnvironment: J2SE-1.5
>
> This is no solution, because then we still get a warning:
>
> "The JRE container on the classpath is not a perfect match to the
> 'J2SE-1.5' execution environment"
>
> This is understandable, because the class path still referred to
> an Java 1.6. No problem, just let Eclipse do the auto fix for you,
> which means it modifies the Java build Path (Tab Libraries, "JRE System
> Library") to an execution environment: "J2SE-1.5 (jre1.6.0_07)".
>
> You wont belief it, but Eclipse still warns on every such adapted
> plug-in project with:
>
> "Build path specifies execution environment J2SE-1.5. There are no JREs
> in the workspace strictly compatible with this environment."

When you look at the Preferences for Java > Installed JREs > Execution
Environments, and select J2SE-1.5, what shows up on the right side? For
me, it shows "JDK 1.5 [perfect match]" and "JDK 1.6"

[more below]

> Side note: In the .settings folder of the projects I found in one of
> the .prefs files the entry
>
> org.eclipse.jdt.core.incompatibleJDKLevel=warning
>
> but changing this value from 'warning' to 'ignore' did not make any
> observable difference :-(

After changing it, did you force a clean build of the project?

Hope this helps,
Eric
Re: Ganymede: Annoying JRE warnings [message #331391 is a reply to message #331390] Thu, 04 September 2008 14:53 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

Copying this to the JDT newsgroup where it might get more experts'
attention...

Eric Rizzo wrote:
> Daniel Krügler wrote:
>> Hello,
>>
>> we are just considering to switch from Eclipse 3.3.2 to Eclipse 3.4.
>>
>> Unfortunately we stumble across an annoying warning in the Package
>> Explorer View for *every* plug-in project. Reason for this is,
>> that most of our developers are working against Java 1.6, but our
>> RCP product is supposed to run *at least* on Java 1.5 systems
>> (therefore we specify a compiler compliance level of Java 1.5).
>>
>> The problem is, that the MANIFEST.MF (on Ganymede) insists on specifying
>> a "Bundle-RequiredExecutionEnvironment" element (if not doing so, we get
>> another warning anyway). Most naturally, we tried to solve this problem
>> by specifying:
>>
>> Bundle-RequiredExecutionEnvironment: J2SE-1.5
>>
>> This is no solution, because then we still get a warning:
>>
>> "The JRE container on the classpath is not a perfect match to the
>> 'J2SE-1.5' execution environment"
>>
>> This is understandable, because the class path still referred to
>> an Java 1.6. No problem, just let Eclipse do the auto fix for you,
>> which means it modifies the Java build Path (Tab Libraries, "JRE
>> System Library") to an execution environment: "J2SE-1.5 (jre1.6.0_07)".
>>
>> You wont belief it, but Eclipse still warns on every such adapted
>> plug-in project with:
>>
>> "Build path specifies execution environment J2SE-1.5. There are no
>> JREs in the workspace strictly compatible with this environment."
>
> When you look at the Preferences for Java > Installed JREs > Execution
> Environments, and select J2SE-1.5, what shows up on the right side? For
> me, it shows "JDK 1.5 [perfect match]" and "JDK 1.6"
>
> [more below]
>
>> Side note: In the .settings folder of the projects I found in one of
>> the .prefs files the entry
>>
>> org.eclipse.jdt.core.incompatibleJDKLevel=warning
>>
>> but changing this value from 'warning' to 'ignore' did not make any
>> observable difference :-(
>
> After changing it, did you force a clean build of the project?
>
> Hope this helps,
> Eric
Re: Ganymede: Annoying JRE warnings [message #331403 is a reply to message #331391] Thu, 04 September 2008 19:50 Go to previous messageGo to next message
Walter Harley is currently offline Walter HarleyFriend
Messages: 847
Registered: July 2009
Senior Member
Eric Rizzo wrote:
> Copying this to the JDT newsgroup where it might get more experts'
> attention...
>
> Eric Rizzo wrote:
>> Daniel Krügler wrote:
>>> Hello,
>>>
>>> we are just considering to switch from Eclipse 3.3.2 to Eclipse 3.4.
>>>
>>> Unfortunately we stumble across an annoying warning in the Package
>>> Explorer View for *every* plug-in project. Reason for this is,
>>> that most of our developers are working against Java 1.6, but our
>>> RCP product is supposed to run *at least* on Java 1.5 systems
>>> (therefore we specify a compiler compliance level of Java 1.5).
>>>
>>> The problem is, that the MANIFEST.MF (on Ganymede) insists on specifying
>>> a "Bundle-RequiredExecutionEnvironment" element (if not doing so, we get
>>> another warning anyway). Most naturally, we tried to solve this problem
>>> by specifying:
>>>
>>> Bundle-RequiredExecutionEnvironment: J2SE-1.5
>>>
>>> This is no solution, because then we still get a warning:
>>>
>>> "The JRE container on the classpath is not a perfect match to the
>>> 'J2SE-1.5' execution environment"
>>>
>>> This is understandable, because the class path still referred to
>>> an Java 1.6. No problem, just let Eclipse do the auto fix for you,
>>> which means it modifies the Java build Path (Tab Libraries, "JRE
>>> System Library") to an execution environment: "J2SE-1.5 (jre1.6.0_07)".


Does it work if you add a 1.5 JRE? (In Window -> Preferences -> Java ->
Installed JREs).
Re: Ganymede: Annoying JRE warnings [message #331409 is a reply to message #331389] Fri, 05 September 2008 05:57 Go to previous messageGo to next message
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------020005080205010107040208
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

[Sorry for the late answer, but yesterday I got no connection to this
group. Answers follow the text flow]

Chris Aniszczyk wrote:
> Daniel Kr
Re: Ganymede: Annoying JRE warnings [message #331410 is a reply to message #331390] Fri, 05 September 2008 06:12 Go to previous messageGo to next message
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------000702060009010507050507
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

[Sorry for my late response, yesterday I could no connection
to this group]

Eric Rizzo wrote:
> Daniel Kr
Re: Ganymede: Annoying JRE warnings [message #331411 is a reply to message #331403] Fri, 05 September 2008 06:25 Go to previous messageGo to next message
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
Walter Harley wrote:
> Eric Rizzo wrote:
>> Copying this to the JDT newsgroup where it might get more experts'
>> attention...
>>
>> Eric Rizzo wrote:
>>> Daniel Krügler wrote:
>>>> Hello,
>>>>
>>>> we are just considering to switch from Eclipse 3.3.2 to Eclipse 3.4.
>>>>
>>>> Unfortunately we stumble across an annoying warning in the Package
>>>> Explorer View for *every* plug-in project. Reason for this is,
>>>> that most of our developers are working against Java 1.6, but our
>>>> RCP product is supposed to run *at least* on Java 1.5 systems
>>>> (therefore we specify a compiler compliance level of Java 1.5).
>>>>
>>>> The problem is, that the MANIFEST.MF (on Ganymede) insists on
>>>> specifying
>>>> a "Bundle-RequiredExecutionEnvironment" element (if not doing so, we
>>>> get
>>>> another warning anyway). Most naturally, we tried to solve this problem
>>>> by specifying:
>>>>
>>>> Bundle-RequiredExecutionEnvironment: J2SE-1.5
>>>>
>>>> This is no solution, because then we still get a warning:
>>>>
>>>> "The JRE container on the classpath is not a perfect match to the
>>>> 'J2SE-1.5' execution environment"
>>>>
>>>> This is understandable, because the class path still referred to
>>>> an Java 1.6. No problem, just let Eclipse do the auto fix for you,
>>>> which means it modifies the Java build Path (Tab Libraries, "JRE
>>>> System Library") to an execution environment: "J2SE-1.5 (jre1.6.0_07)".
>
>
> Does it work if you add a 1.5 JRE? (In Window -> Preferences -> Java ->
> Installed JREs).

Unfortunately we have a rather strict internal policy to have only one
JRE installed, so I cannot test it :-(

Thanks for your input,

Daniel
Re: Ganymede: Annoying JRE warnings [message #331413 is a reply to message #331411] Fri, 05 September 2008 07:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mauro.molinari.cardinis.com

Daniel Krügler ha scritto:
> Unfortunately we have a rather strict internal policy to have only one
> JRE installed, so I cannot test it :-(
>
> Thanks for your input,

I hope you'll be able to solve your problem, anyway IMHO let me say that
having such restrictions for users like you (i.e.: developers, not end
users!) is quite debatable...

Using a JRE 1.6 for your project and setting the compiler compliance
level to 1.5 does NOT mean that you are sure that your project will run
fine on Java 5, for two main reasons:
1) execution: even if Java 6 is supposed to be retro-compatible with
Java 5 at runtime, there may be some little differences when running
your program using Java 6 rather than Java 5; so, by experience, I can
say that testing your application with both JREs is a must if you want
to be compatible with both
2) API: if your project is configured to use a Java 5 runtime
environment BUT this is linked to an actual Java 6 JDK/JRE, I fear
(never tried it) that Eclipse will make you see also API classes and
methods that are in Java 6 but not in Java 5, because in your classpath
you actually have a Java 6 JDK/JRE bundle... This means that you have to
be very very careful not to use those APIs, otherwise your application
won't run with a 1.5 JRE, even if the bytecode is 1.5 compliant.

Therefore, I think you may also complain with your system administrator...

Mauro.
Re: Ganymede: Annoying JRE warnings [message #331425 is a reply to message #331413] Fri, 05 September 2008 13:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

Mauro Molinari wrote:
> Daniel Krügler ha scritto:
>> Unfortunately we have a rather strict internal policy to have only one
>> JRE installed, so I cannot test it :-(
>>
>> Thanks for your input,
>
> I hope you'll be able to solve your problem, anyway IMHO let me say that
> having such restrictions for users like you (i.e.: developers, not end
> users!) is quite debatable...
>
> Using a JRE 1.6 for your project and setting the compiler compliance
> level to 1.5 does NOT mean that you are sure that your project will run
> fine on Java 5, for two main reasons:
> 1) execution: even if Java 6 is supposed to be retro-compatible with
> Java 5 at runtime, there may be some little differences when running
> your program using Java 6 rather than Java 5; so, by experience, I can
> say that testing your application with both JREs is a must if you want
> to be compatible with both
> 2) API: if your project is configured to use a Java 5 runtime
> environment BUT this is linked to an actual Java 6 JDK/JRE, I fear
> (never tried it) that Eclipse will make you see also API classes and
> methods that are in Java 6 but not in Java 5, because in your classpath
> you actually have a Java 6 JDK/JRE bundle... This means that you have to
> be very very careful not to use those APIs, otherwise your application
> won't run with a 1.5 JRE, even if the bytecode is 1.5 compliant.
>
> Therefore, I think you may also complain with your system administrator...

I agree with Mauro's point #2 above. Furthermore, it is easy to simply
extract a JDK instead of "installing" it. The JDK does not need to have
any real installation (such as registry settings, browser integration,
etc.). I currently have 4 JDKs on my machine, and none of them are the
same version as the JRE that is "installed" and used by Windows.

Eric
Re: Ganymede: Annoying JRE warnings [message #331446 is a reply to message #331425] Mon, 08 September 2008 06:30 Go to previous message
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
Eric Rizzo wrote:
> Mauro Molinari wrote:
>> Daniel Krügler ha scritto:
>>> Unfortunately we have a rather strict internal policy to have only one
>>> JRE installed, so I cannot test it :-(
>>>
>>> Thanks for your input,
>>
>> I hope you'll be able to solve your problem, anyway IMHO let me say
>> that having such restrictions for users like you (i.e.: developers,
>> not end users!) is quite debatable...
>>
>> Using a JRE 1.6 for your project and setting the compiler compliance
>> level to 1.5 does NOT mean that you are sure that your project will
>> run fine on Java 5, for two main reasons:
>> 1) execution: even if Java 6 is supposed to be retro-compatible with
>> Java 5 at runtime, there may be some little differences when running
>> your program using Java 6 rather than Java 5; so, by experience, I can
>> say that testing your application with both JREs is a must if you want
>> to be compatible with both
>> 2) API: if your project is configured to use a Java 5 runtime
>> environment BUT this is linked to an actual Java 6 JDK/JRE, I fear
>> (never tried it) that Eclipse will make you see also API classes and
>> methods that are in Java 6 but not in Java 5, because in your
>> classpath you actually have a Java 6 JDK/JRE bundle... This means that
>> you have to be very very careful not to use those APIs, otherwise your
>> application won't run with a 1.5 JRE, even if the bytecode is 1.5
>> compliant.
>>
>> Therefore, I think you may also complain with your system
>> administrator...
>
> I agree with Mauro's point #2 above. Furthermore, it is easy to simply
> extract a JDK instead of "installing" it. The JDK does not need to have
> any real installation (such as registry settings, browser integration,
> etc.). I currently have 4 JDKs on my machine, and none of them are the
> same version as the JRE that is "installed" and used by Windows.

Thanks for your tips! We will discuss this with our administrators,
but independent on the outcome of this discussion I strongly would
appreciate if I could at least explicitly get rid of this warning.
Is anyone aware of a corresponding flag that can be switched-off?

Thanks
Previous Topic:toggle button persistent between Eclipse sessions
Next Topic:Plug-in Beginner
Goto Forum:
  


Current Time: Sat Nov 02 16:52:00 GMT 2024

Powered by FUDForum. Page generated in 0.04177 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top