Home » Language IDEs » Java Development Tools (JDT) » Re: Ganymede: Annoying JRE warnings
Re: Ganymede: Annoying JRE warnings [message #256097] |
Thu, 04 September 2008 10:53  |
Eclipse User |
|
|
|
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 #256101 is a reply to message #256097] |
Thu, 04 September 2008 15:50   |
Eclipse User |
|
|
|
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 #256110 is a reply to message #256101] |
Fri, 05 September 2008 02:25   |
Eclipse User |
|
|
|
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 #256114 is a reply to message #256110] |
Fri, 05 September 2008 03:17   |
Eclipse User |
|
|
|
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 #256122 is a reply to message #256114] |
Fri, 05 September 2008 09:02   |
Eclipse User |
|
|
|
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 #256155 is a reply to message #256122] |
Mon, 08 September 2008 02:30  |
Eclipse User |
|
|
|
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
|
|
|
Goto Forum:
Current Time: Mon Jun 23 00:09:59 EDT 2025
Powered by FUDForum. Page generated in 0.05896 seconds
|