Reputation: 1736
I have an RCP Eclipse
product that defines the -configuration folder to be in a different location from the exe
and ini
files. When I specify the path to configuration in the ini
as relative to the exe
, launching the product only works when launched from the directory of the exe
.
Ie: /home/Sheldon>product.exe
Launching from another directory fails, unless the configuration path is set to an absolute path in the ini
file.
Ie: >/home/Sheldon/product.exe
This is not the case for the startup
or launcher.library
variables.
Is there a way to support this setup with a relative configuration path?
Upvotes: 1
Views: 2138
Reputation: 1736
I rarely like to close my own question without a comment or an anwser, but I did come to a conclusion and I think it is the best answer at this time.
I do not believe this is possible, without modifying the eclipse source.
In particular, LocationManager : buildLocation.
So, the best compromise is to place the configuration
folder adjacent to the plugins
folder. It is fine for the plugins
folder to be in a relative path. For example, a valid product.ini
with these folders in relative path would look like:
-startup
../Common/plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
../Common/plugins/org.eclipse.equinox.launcher.i18n.win32.win32.x86_64_4.2.0.v20
1201111650
-vm
../jre/bin/javaw.exe
This means that the configuration
folder MUST exist in ../Common/configuration
to have a relative path. Any other folder will require an absolute path, or usage of one of the less than useful replacement variables, { @NoDefault
, @None
, @user.dir
, @user.home
}.
Upvotes: 1