Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Why is JRE Execution Environment only set on JRE 1.4?
Why is JRE Execution Environment only set on JRE 1.4? [message #1733939] Thu, 02 June 2016 10:53 Go to next message
Mattias Andersson is currently offline Mattias AnderssonFriend
Messages: 19
Registered: June 2010
Junior Member
In our scenario the user chose the JRE to run Eclipse on at the start page. I add a JRETask in my setup to enforce the correct JRE version and remind the user the select a JDK.

In our current setup both JRE's are version 1.8, hence both the JRE and the JDK is listed in the Eclipse preferences. The JDK is set as default but Eclipse does not use that JDK for new project or projects imported by Ommph and the users does not get any debug information for standard libraries.

If manually select the JDK as the default for execution environment JavaSE-1.8 it works as I should. But I can't figure out how to do this with Oomph.

In JRETask implementation I see that the execution environment is set for J2SE-1.4 but not for anything else.
Re: Why is JRE Execution Environment only set on JRE 1.4? [message #1734021 is a reply to message #1733939] Fri, 03 June 2016 06:35 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30996
Registered: July 2009
Senior Member
Mattias,

Comments below.


On 02.06.2016 12:53, Mattias Andersson wrote:
> In our scenario the user chose the JRE to run Eclipse on at the start
> page. I add a JRETask in my setup to enforce the correct JRE version
> and remind the user the select a JDK.
> In our current setup both JRE's are version 1.8, hence both the JRE
> and the JDK is listed in the Eclipse preferences.
I see.
> The JDK is set as default but Eclipse does not use that JDK for new
> project or projects imported by Ommph and the users does not get any
> debug information for standard libraries.
What does it use? The JRE? Which order are the tasks performed? I
think each task will make itself the default via

JavaRuntime.setDefaultVMInstall(realVM, new NullProgressMonitor());

> If manually select the JDK as the default for execution environment
> JavaSE-1.8 it works as I should. But I can't figure out how to do this
> with Oomph.
>
> In JRETask implementation I see that the execution environment is set
> for J2SE-1.4 but not for anything else.
If I recall correctly, it's only a special case for
"CDC-1.1/Foundation-1.1". I think the others just work on their own.
But I'm not totally sure.

If the JDK-based JRE task is performing last and ends up not being the
default, please open a Bugzilla with details to reproduce/observe the
problem.
Re: Why is JRE Execution Environment only set on JRE 1.4? [message #1734061 is a reply to message #1734021] Fri, 03 June 2016 12:20 Go to previous messageGo to next message
Mattias Andersson is currently offline Mattias AnderssonFriend
Messages: 19
Registered: June 2010
Junior Member
Hi Ed,

Thanks again for a quick answer.

The JDK installed by Ommph is set as default. However Eclipse does not honor it for my projects. If I set the execution environment for JavaSE-1.8 to my JDK it works as I should.


I created a new setup Project Model from the Cool Stuff template, changed the JRE to 1.8, changed the GIT repo url and added a Maven import.

At the first Oomph Wizard page I selected a JRE to execute Eclipse.

At the Variable page I selected a JDK to use.

In the resulting Eclipse installation JRE Preference page the JDK is selected as default.

index.php/fa/26063/0/ (default_jre.png)

But my imported project (my-app) and a newly created project (new_proj) gets the JRE class path.

index.php/fa/26065/0/ (project_classpath.png)

If I select the JDK as default for execution environment JavaSE-1.8.

index.php/fa/26064/0/ (execution_env.png)

The class path is correct

index.php/fa/26066/0/ (with_execution_env.png)

While this would be possible to fix in JRETask it might be an Eclipse bug?

[Updated on: Fri, 03 June 2016 19:10]

Report message to a moderator

Re: Why is JRE Execution Environment only set on JRE 1.4? [message #1734310 is a reply to message #1734061] Tue, 07 June 2016 04:19 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30996
Registered: July 2009
Senior Member
Mattias,

I'm not sure how JDT chooses a default if there is more than one perfect
match. Perhaps the first one that's created.


On 03.06.2016 14:20, Mattias Andersson wrote:
> Hi Ed,
>
> Thanks again for you quick answer.
>
> The JDK installed by Ommph is set as default. However Eclipse does not honor it for my projects. If I set the execution environment for JavaSE-1.8 to my JDK it works as I should.
>
>
> I created a new setup Project Model from the Cool Stuff template, changed the JRE to 1.8, changed the GIT repo url and added a Maven import.
>
> At the first Oomph Wizard page I selected a JRE to execute Eclipse.
>
> At the Variable page I selected a JDK to use.
>
> In the resulting Eclipse installation JRE Preference page the JDK is selected as default.
>
> (default_jre.png)
>
> But my imported project (my-app) and a newly created project (new_proj) gets the JRE class path.
>
> (project_classpath.png)
>
> If I select the JDK as default for execution environment JavaSE-1.8.
>
> (execution_env.png)
>
> The class path is correct
>
> (with_execution_env.png)
>
> While this would be possible to fix in JRETask it might be an Eclipse bug?
Re: Why is JRE Execution Environment only set on JRE 1.4? [message #1734342 is a reply to message #1734310] Tue, 07 June 2016 10:05 Go to previous messageGo to next message
Mattias Andersson is currently offline Mattias AnderssonFriend
Messages: 19
Registered: June 2010
Junior Member
Yes I think you are correct. However the problem for me is that I can't control the JRE to use for building through Ommph.

I think Ommph should set the JRE installed by Oomph as the default JRE for its execution environment. Possible as optional setting.

Should I file a bug?

[Updated on: Tue, 07 June 2016 18:28]

Report message to a moderator

Re: Why is JRE Execution Environment only set on JRE 1.4? [message #1734378 is a reply to message #1734342] Tue, 07 June 2016 16:37 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30996
Registered: July 2009
Senior Member
Please file a bug and I'll investigate for the next development cycle.


On 07.06.2016 12:05, Mattias Andersson wrote:
> Yes I think you are correct. However the problem for me is that I
> can't control the JRE to use for building through Ommph.
> I think Ommph should set the JRE installed by Oomph as the default JRE
> for its execution environment. Possible as optional setting.
>
> Should a file a bug?
Re: Why is JRE Execution Environment only set on JRE 1.4? [message #1734408 is a reply to message #1734378] Wed, 08 June 2016 06:15 Go to previous message
Mattias Andersson is currently offline Mattias AnderssonFriend
Messages: 19
Registered: June 2010
Junior Member
https://bugs.eclipse.org/bugs/show_bug.cgi?id=495643
Previous Topic:xtext create custom import wizard
Next Topic:Beginner's question: where is eclipse-inst.ini?
Goto Forum:
  


Current Time: Mon Mar 30 14:38:53 GMT 2020

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

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

Back to the top