eclipse.ini变量 [英] eclipse.ini variables

查看:168
本文介绍了eclipse.ini变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

eclipse.ini或eclipse命令行可以进行变量解析吗?



如$ PATH或$ {java.home}?

解决方案

常见问题:如何我运行Eclipse?


如果在eclipse / jre目录下可用,Eclipse JRE将被使用;否则启动器将参考系统路径变量。 Eclipse不会查询JAVA_HOME环境变量。


eclipse命令行可以使用环境变量(像任何其他命令):

  eclipse -vm $ jAVA_HOME / bin 

将工作。



但Eclipse本身(或eclipse.ini)将不会直接使用解析环境变量。

只有这样一个 eclipse.ini使用完整的路径。






其实, bug 102239 已经要求这种功能...自2005年以来!


Bug 102239 - [launcher] < launcher> .ini / eclipse.ini


$ b $中的环境变量替换b

如果启动器支持插入,这将是非常有帮助的< launcher> .ini 中的环境变量。

无论什么形式都有意义(例如, @ENV %ENV% $ {ENV} $ {env_var:ENV}



eg像




  -vm 
$ {MYRCPAPP_VM}
-mx $ {MYRCPAPP_HEAPSIZE}

但答案请求帮助:


启动器是用C编写的。代码在平台启动程序项目中。



这在任何参数,包括vm,vmargs等,在这种情况下,这将需要发生在本机代码。



does eclipse.ini or eclipse command line does variable parsing?

such as $PATH or ${java.home} ?

解决方案

As mentioned in FAQ: How do I run Eclipse?

If available under the eclipse/jre directory, the Eclipse JRE will be used; otherwise the launcher will consult the system path variable. Eclipse will NOT consult the JAVA_HOME environment variable.

a eclipse command line can use environment variable (like any other command):

eclipse -vm $jAVA_HOME/bin

would work.

But Eclipse itself (or eclipse.ini) will not use parse directly an environment variable.
A eclipse.ini like this one only use full paths.


Actually, bug 102239 is already asking for that kind of feature... since 2005!

Bug 102239 - [launcher] Environment variable substitution in <launcher>.ini/eclipse.ini

It'd be very helpful if the launcher would support the insertion of environment variables in the <launcher>.ini.
Whatever form might make sense (e.g. @ENV, %ENV%, ${ENV}, ${env_var:ENV})

e.g. something like

-vm
${MYRCPAPP_VM}
-mx${MYRCPAPP_HEAPSIZE}

But the answers ask for help on this:

The launcher is written in C. The code is in the platform-launcher project.

[To] want this on any argument including the vm, vmargs etc, in which case this would need to happen in the native code.

这篇关于eclipse.ini变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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