Eclipse启动器的ini配置变量可以采取相对路径吗? [英] Can Eclipse launcher ini -configuration variable take a relative path?

查看:160
本文介绍了Eclipse启动器的ini配置变量可以采取相对路径吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 RCP Eclipse 产品,它将-configuration文件夹定位在与 exe 不同的位置和 ini 文件。当我将相对于 exe ini 中的配置路径指定为时,启动该产品仅在从 exe 的目录启动时起作用。

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.

即: / home / Sheldon> product.exe

从另一个目录启动 失败,除非配置路径设置为 ini 文件中的绝对路径

Launching from another directory fails, unless the configuration path is set to an absolute path in the ini file.

Ie:> /home/Sheldon/product.exe

启动 launcher.library 变量不是这样。

有没有办法使用相对配置路径支持此设置?

Is there a way to support this setup with a relative configuration path?

推荐答案

我很少想关闭我自己的问题,没有评论或者一个烦恼,但我没有得出结论,我认为这是目前最好的答案。

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.

我不相信这是可能的,没有修改eclipse源。

I do not believe this is possible, without modifying the eclipse source.

特别是, LocationManager buildLocation

所以,最好的妥协是将配置文件夹旁边的插件文件夹。 plugins 文件夹位于相对路径中是很好的。例如,相对路径中这些文件夹的有效 product.ini 将如下所示:

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

这意味着配置文件夹必须存在于 ../ Common / configuration 具有相对路径。任何其他文件夹将需要绝对路径,或使用不太有用的替换变量{ @NoDefault @None @ user.dir @ user.home }。

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 }.

这篇关于Eclipse启动器的ini配置变量可以采取相对路径吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆