how to access environment variables form a launch configuration [message #223332] |
Mon, 30 January 2006 12:24  |
Eclipse User |
|
|
|
Originally posted by: hannes.2horns.com
Group,
I had asked this question already on the eclipse.platform mailing list, but
I finally reckoned that was just not the right place for it.
So I'm reposting it here.
I wonder whether it is possible to access environment variables from within
a launch configuration.
e.g. I'd like to use an environment variable when specifying arguments for
the java program to be launched.
e.g. -prefs=$USER/.prefs
where $USER is an environment variable set outside of eclipse.
The way I tried it is not working - duh. How would I do this (if possible)
correctly?
Thx. a lot,
H.
|
|
|
|
|
|
|
|
Re: how to access environment variables form a launch configuration [message #223398 is a reply to message #223390] |
Mon, 30 January 2006 19:13  |
Eclipse User |
|
|
|
Originally posted by: hannes.2horns.com
Jared,
That was exactly what I was looking for!
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS"
value="-path ${env_var:WORK_HOME}"/>
indeed did the trick!
thx a gazillion!
H.
Jared Burns wrote:
> Launch configuration support their own kind of variables. These can be
> contributed via extension and the platform also provides some -
> including a variable which you can use to reference environment vars.
>
> In the launch configuration dialog, click on the "Variables..." button
> next to a field. Select "env_var" and enter the name of the variable
> in the "Arguments" field. This will insert a variable reference like
> "${env_var:HOME}" into whatever text field you're configuring.
>
> - Jared
>
> Hans Horn wrote:
>> Group,
>>
>> I had asked this question already on the eclipse.platform mailing
>> list, but I finally reckoned that was just not the right place for
>> it. So I'm reposting it here.
>>
>> I wonder whether it is possible to access environment variables from
>> within a launch configuration.
>>
>> e.g. I'd like to use an environment variable when specifying
>> arguments for the java program to be launched.
>>
>> e.g. -prefs=$USER/.prefs
>>
>> where $USER is an environment variable set outside of eclipse.
>>
>> The way I tried it is not working - duh. How would I do this (if
>> possible) correctly?
>>
>> Thx. a lot,
>> H.
|
|
|
Powered by
FUDForum. Page generated in 0.04562 seconds