Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » External Tool Launchers - Using variable env_var
External Tool Launchers - Using variable env_var [message #315959] Sat, 26 May 2007 19:48 Go to next message
Eclipse User
Originally posted by: tardis.idcomm.com

What does ${env_var:xxxxxxx} refer to?
It is not clear if it means the system environment or variables
declared within eclipse itself. Unless there is a bug (in the OS X
implementation) the behavior suggests the later. Below is the observed
behavior.
I attempted to create a External Tool launcher for gant (Groovy Ant
wrapper) I have groovy installed with an environment (shell/OS level)
variable of GROOVY_HOME which contains the absolute path (not a link)
to the groovy installation, gant installs in the directory:
${GROOVY_HOME}/bin
and has the correct permissions to execute as a shell script. I tried
to configure a launcher through run -> external tools -> external tools
-> new config
for location select varaible "${env_var} with arg of GROOVY_HOME
location field now reads;
${env_var:GROOVY_HOME}
message area at top reads
"External tool location does not exist"
add /bin so location now reads;
${env_var:GROOVY_HOME}/bin
error message changes to
"External tool location specified is not a file"
si ti resolved to something. Add /gant so location now reads;
${env_var:GROOVY_HOME}/bin/gant
message reverts to
"External tool location does not exist"
Using browse and selecting actual file works fine. Further
investigation i.e. creating a executable file called gant in /bin shows
the ${env_var:GROOVY_HOME} is expanding to an empty string as the path
${env_var:GROOVY_HOME}/bin/gant is then valid. GROOVY_HOME is correctly
defined by the .bash_profile for my account and the groovy bin
directory is on the path, i.e. it all works from a shell prompt.

Is this corrrect, a behavioural bug or a documentation 'bug' ?
Too me since we're referring to an external tool I would expect it to
refer to a shell/OS/Login level variable which in my mind makes this a
bug.

Ray
Re: External Tool Launchers - Using variable env_var [message #315998 is a reply to message #315959] Mon, 28 May 2007 19:10 Go to previous messageGo to next message
Darin Wright is currently offline Darin Wright
Messages: 454
Registered: July 2009
Senior Member
The ${env_var:X} variable resolves to OS environment variables. For example,
the following works on Windows for an external tool location:

${env_var:HOME_DRIVE}/jdk1.4.2_08/jre/bin/java.exe

Darin Wright

"Ray Sutton" <tardis@idcomm.com> wrote in message
news:f3a2v9$nm8$1@build.eclipse.org...
> What does ${env_var:xxxxxxx} refer to?
> It is not clear if it means the system environment or variables declared
> within eclipse itself. Unless there is a bug (in the OS X implementation)
> the behavior suggests the later. Below is the observed behavior.
> I attempted to create a External Tool launcher for gant (Groovy Ant
> wrapper) I have groovy installed with an environment (shell/OS level)
> variable of GROOVY_HOME which contains the absolute path (not a link) to
> the groovy installation, gant installs in the directory:
> ${GROOVY_HOME}/bin
> and has the correct permissions to execute as a shell script. I tried to
> configure a launcher through run -> external tools -> external tools ->
> new config
> for location select varaible "${env_var} with arg of GROOVY_HOME location
> field now reads;
> ${env_var:GROOVY_HOME}
> message area at top reads
> "External tool location does not exist"
> add /bin so location now reads;
> ${env_var:GROOVY_HOME}/bin
> error message changes to
> "External tool location specified is not a file"
> si ti resolved to something. Add /gant so location now reads;
> ${env_var:GROOVY_HOME}/bin/gant
> message reverts to
> "External tool location does not exist"
> Using browse and selecting actual file works fine. Further investigation
> i.e. creating a executable file called gant in /bin shows the
> ${env_var:GROOVY_HOME} is expanding to an empty string as the path
> ${env_var:GROOVY_HOME}/bin/gant is then valid. GROOVY_HOME is correctly
> defined by the .bash_profile for my account and the groovy bin directory
> is on the path, i.e. it all works from a shell prompt.
>
> Is this corrrect, a behavioural bug or a documentation 'bug' ?
> Too me since we're referring to an external tool I would expect it to
> refer to a shell/OS/Login level variable which in my mind makes this a
> bug.
>
> Ray
>
>
>
Re: External Tool Launchers - Using variable env_var [message #316001 is a reply to message #315998] Mon, 28 May 2007 21:03 Go to previous message
Eclipse User
Originally posted by: tardis.idcomm.com

Thanks

That what I expected; so either Eclipse under OS X has a problem seeing
my environment variables or my system is misconfigured in some way.



On 2007-05-28 13:10:13 -0600, "Darin Wright" <Darin_Wright@ca.ibm.com> said:

> The ${env_var:X} variable resolves to OS environment variables. For example,
> the following works on Windows for an external tool location:
>
> ${env_var:HOME_DRIVE}/jdk1.4.2_08/jre/bin/java.exe
>
> Darin Wright
>
> "Ray Sutton" <tardis@idcomm.com> wrote in message
> news:f3a2v9$nm8$1@build.eclipse.org...
>> What does ${env_var:xxxxxxx} refer to?
>> It is not clear if it means the system environment or variables declared
>> within eclipse itself. Unless there is a bug (in the OS X implementation)
>> the behavior suggests the later. Below is the observed behavior.
>> I attempted to create a External Tool launcher for gant (Groovy Ant
>> wrapper) I have groovy installed with an environment (shell/OS level)
>> variable of GROOVY_HOME which contains the absolute path (not a link) to
>> the groovy installation, gant installs in the directory:
>> ${GROOVY_HOME}/bin
>> and has the correct permissions to execute as a shell script. I tried to
>> configure a launcher through run -> external tools -> external tools ->
>> new config
>> for location select varaible "${env_var} with arg of GROOVY_HOME location
>> field now reads;
>> ${env_var:GROOVY_HOME}
>> message area at top reads
>> "External tool location does not exist"
>> add /bin so location now reads;
>> ${env_var:GROOVY_HOME}/bin
>> error message changes to
>> "External tool location specified is not a file"
>> si ti resolved to something. Add /gant so location now reads;
>> ${env_var:GROOVY_HOME}/bin/gant
>> message reverts to
>> "External tool location does not exist"
>> Using browse and selecting actual file works fine. Further investigation
>> i.e. creating a executable file called gant in /bin shows the
>> ${env_var:GROOVY_HOME} is expanding to an empty string as the path
>> ${env_var:GROOVY_HOME}/bin/gant is then valid. GROOVY_HOME is correctly
>> defined by the .bash_profile for my account and the groovy bin directory
>> is on the path, i.e. it all works from a shell prompt.
>>
>> Is this corrrect, a behavioural bug or a documentation 'bug' ?
>> Too me since we're referring to an external tool I would expect it to
>> refer to a shell/OS/Login level variable which in my mind makes this a
>> bug.
>>
>> Ray
Previous Topic:Contextual Launching Migration Guide?
Next Topic:Building a project (IProject) using IProject.build() - does not work
Goto Forum:
  


Current Time: Fri Oct 31 05:45:23 GMT 2014

Powered by FUDForum. Page generated in 0.02806 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software