eclipse:覆盖config.ini中的user.name [英] eclipse: overriding user.name in config.ini

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

问题描述

我有一个多用户eclipse(3.4)安装与共享主配置区域。
用户需要重写 user.name 与他们的全名和通常的方法(添加-Duser.name = ...到eclipse.ini)是不合适的因为覆盖必须是每个用户。
我尝试在config.ini中设置user.name(在每个用户的配置目录下):

I have a multi-user eclipse (3.4) installation with a shared master configuration area. Users need to override user.name with their full name and the usual method (adding -Duser.name=... to eclipse.ini) is not suitable since the override must be per-user. I've tried setting user.name in config.ini (inside each user's configuration directory):

user.name=Luca Tettamanti

,eclipse仍然保留登录名。奇怪的是:

but it does work, eclipse still retains the login name. The strange thing is that:

user.foobar=Luca Tettamanti

正确选取。

is correctly picked up. Is it possible to somehow override user.name in this configuration?

推荐答案

已在之前报告。

为什么你不使用自定义的eclipse启动器(一个脚本 .cmd ),这将修改eclipse.ini,然后调用eclipse.exe?

Why would you not use use a custom eclipse launcher (a script .cmd), which would modify the eclipse.ini, and then call eclipse.exe ?

该脚本可以使用以下命令检索全名:

That script could retrieve the full name with a comand like:

net user %username% /domain | find /i "full"






Windows,您的自定义启动器将运行eclipse与:


That way, in Windows, your custom launcher would run eclipse with:

eclipse.exe -clean --launcher.ini shared\eclipse.ini -vmargs -Duser.name=%FULL_NAME%

使用共享的eclipse.ini, code> user.name 值。

using the shared eclipse.ini, but specifying the user.name value.

的shell变量 USER 添加到Eclipse中,您需要这样做:

In Linux, to relay the contents of the shell variable USER to Eclipse, you need to do this:

exec eclipse -clean --launcher.ini shared/eclipse.ini -vmargs -Duser.name=`eval "echo $USER"`

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

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