JRE Task Default VM Arguments [message #1840304] |
Mon, 12 April 2021 04:22  |
Eclipse User |
|
|
|
Hi all,
in my Oomph project I have added a JRE task to set a default JRE with default VM arguments. The arguments contain a variable for a path that must be set:
<setupTask
xsi:type="jdt:JRETask"
id="default.project.jvm"
version="JavaSE-1.8"
location="${jre.location-1.8x86}"
name="JavaSE-1.8 JRE x86"
vmArguments="-Dpath=\"${variable.path}\"">
<description>Set default JVM in Eclipse</description>
After installing everything, this works as intended, the JRE is set and the default arguments are also correct.
Now there might be the case that this path should be changed. For this, the User should only go to Window->Prefrences->Java-> Installed JREs and change this default VM argument.
Unfortunately, after restarting Eclipse, the VM arguments are rewritten with the old path followed by the new one.
So for example:
After installation: -Dpath "C:\Test"
After manual change: -Dpath "C:\Other"
After restart: -Dpath "C:\Test" -Dpath "C:\Other"
Is there a way to disable the JRE task once it has been completed? I think that way, the user changed path should not be rewritten.
Otherwise, is there an option to prevent the task from appending the old string to the arguments, so that after a restart only one "-Dpath ..." is in the default arguments?
Regards,
Sascha
|
|
|
|
Re: JRE Task Default VM Arguments [message #1840317 is a reply to message #1840310] |
Mon, 12 April 2021 07:12  |
Eclipse User |
|
|
|
Hi Ed,
thanks for your response. So I just tried your suggestions and it works good. I think it will be a good solution, that the users can change the path in the preferences. I didn't think of the string substitution part before :)
Thank you very much!
|
|
|
Powered by
FUDForum. Page generated in 0.03659 seconds