Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Install eclipse with a bundled jre (jre copied inside eclipse installation)
Install eclipse with a bundled jre (jre copied inside eclipse installation) [message #1819589] Fri, 17 January 2020 16:18 Go to next message
Mario Jauvin is currently offline Mario JauvinFriend
Messages: 79
Registered: October 2015
Member
Is it possible with oomph to have the JRE copied inside the eclipse installation in the jre subfolder (i.e folder eclipse\jre) so that it will be included in each installation?
Re: Install eclipse with a bundled jre (jre copied inside eclipse installation) [message #1819609 is a reply to message #1819589] Sat, 18 January 2020 06:48 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 32109
Registered: July 2009
Senior Member
It's possible in principle, but there are some details that would need attention. E.g., not generating a -vm entry in the eclipse.ini. Also, while a Resource Copy task can be used to unzip a remote resource (zip) into a local folder, on Mac and Linux there is the issue of setting the executable bits for the JRE to be properly functional.

Note that we have approval to redistribute OpenJDK so some work will be done in this area soon:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=506244


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Install eclipse with a bundled jre (jre copied inside eclipse installation) [message #1847910 is a reply to message #1819609] Fri, 12 November 2021 10:05 Go to previous messageGo to next message
Zdeněk Ziegler is currently offline Zdeněk ZieglerFriend
Messages: 17
Registered: November 2019
Junior Member
Hi,
I am also trying to do bundled JRE and I would like to ask you how can I get rid off predefined -vm <java_path> in eclipse.ini.

I succesfully copied resources into eclipse install destination. I add -vm budled_java_path into Eclipse.ini.

But I do have predefined init task during setup which adds my localy installed java into Eclipse.ini.

See the attachted picture:
- yellow marked lines are somehome predefined and I do not know how to get rid of them
- red maked is my task which should be the only one there.
Re: Install eclipse with a bundled jre (jre copied inside eclipse installation) [message #1847911 is a reply to message #1847910] Fri, 12 November 2021 10:34 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 32109
Registered: July 2009
Senior Member
Did you create the task exactly like this?
<?xml version="1.0" encoding="UTF-8"?>
<setup:EclipseIniTask
    xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"
    xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
    option="-vm"
    value="jre/bin"/>
It's important to separate the two parts into the option/value so that this -vm task overrides the other -vm task.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Install eclipse with a bundled jre (jre copied inside eclipse installation) [message #1847912 is a reply to message #1847911] Fri, 12 November 2021 10:38 Go to previous messageGo to next message
Zdeněk Ziegler is currently offline Zdeněk ZieglerFriend
Messages: 17
Registered: November 2019
Junior Member
Ed Merks wrote on Fri, 12 November 2021 10:34
Did you create the task exactly like this?
<?xml version="1.0" encoding="UTF-8"?>
<setup:EclipseIniTask
    xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"
    xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
    option="-vm"
    value="jre/bin"/>
It's important to separate the two parts into the option/value so that this -vm task overrides the other -vm task.



I used the UI editor instead of XML. It looks like this in my .setup file:

<setupTask
          xsi:type="setup:EclipseIniTask"
          option="-vm "
          value="jre/bin"/>


Its hard to now the syntax without documentation :( But I will try it your way :)
Re: Install eclipse with a bundled jre (jre copied inside eclipse installation) [message #1847913 is a reply to message #1847912] Fri, 12 November 2021 11:49 Go to previous messageGo to next message
Zdeněk Ziegler is currently offline Zdeněk ZieglerFriend
Messages: 17
Registered: November 2019
Junior Member
It worked perfectly! Thank you very much.
Re: Install eclipse with a bundled jre (jre copied inside eclipse installation) [message #1847914 is a reply to message #1847913] Fri, 12 November 2021 12:04 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 32109
Registered: July 2009
Senior Member
Note that in your original version you had a space after -vm whereas the correct version does not have that.

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Install eclipse with a bundled jre (jre copied inside eclipse installation) [message #1847915 is a reply to message #1847914] Fri, 12 November 2021 12:18 Go to previous messageGo to next message
Zdeněk Ziegler is currently offline Zdeněk ZieglerFriend
Messages: 17
Registered: November 2019
Junior Member
Yes, I have noticed, thats what I changed. Thank you again :)
Re: Install eclipse with a bundled jre (jre copied inside eclipse installation) [message #1847918 is a reply to message #1847915] Fri, 12 November 2021 15:07 Go to previous messageGo to next message
Zdeněk Ziegler is currently offline Zdeněk ZieglerFriend
Messages: 17
Registered: November 2019
Junior Member
I do have another question. I am using Resource Copy task to copy unzipped jre folder into installed eclipse instance using as target path: ${installation.location/}${installation.relativeProductFolder}

it works as it should... sort of.

It creates the jre folder in target path, copy some of files into it, but in the comparation of source/target file count, filecounts are not the same, in target folder are 100-ish files missing.

Any ideas, how to solve it? :(
Re: Install eclipse with a bundled jre (jre copied inside eclipse installation) [message #1847922 is a reply to message #1847918] Fri, 12 November 2021 16:03 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 32109
Registered: July 2009
Senior Member
I don't have a theory for that. You could create a development environment using https://www.eclipse.org/setups/installer/?url=http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/configurations/OomphConfiguration.setup&show=true and then try running the task in debug mode with a breakpoint in org.eclipse.oomph.setup.impl.ResourceCopyTaskImpl.perform(SetupTaskContext) to see what's happening. You could debug the launched installer or for quick testing, you could launch the "IDE" launcher in debug mode, use Navigate -> Open Setup -> Workspace, copy your resource copy task into the Workspace (with a target location that works for testing purposes), and then use Help -> Perform Setup Tasks to run it.

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Install eclipse with a bundled jre (jre copied inside eclipse installation) [message #1847948 is a reply to message #1847922] Mon, 15 November 2021 07:28 Go to previous message
Zdeněk Ziegler is currently offline Zdeněk ZieglerFriend
Messages: 17
Registered: November 2019
Junior Member
Thank you for your tip, I already use debugging. :) I will try to debug this task and hopefully it will get me on to something.
Previous Topic:How to add maven dependencies for Targlet?
Goto Forum:
  


Current Time: Wed Dec 01 09:42:51 GMT 2021

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

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

Back to the top