That explains why it works from the terminal but not your java code. You
need to pass the GLOBUS_LOCATION environment variable through your java
code into the environment of globus-job-run. One way to do it is to run:

/usr/bin/env GLOBUS_LOCATION=/opt/globus /opt/globus/bin/globus-job-run

You may also need to pass other environment variables for it to work,
such as PATH and LD_LIBRARY_PATH.

Perhaps you should consider instead using the org.globus.gram package in
your Java code rather than calling the globus-job-run script.

http://www.cogkit.org/release/4_1_4/api/jglobus/org/globus/gram/package-summary.html

Muhammad Sarwar wrote:
> doing an echo gives following:
> 
>> : echo $GLOBUS_LOCATION
> /opt/globus
> 
> which is the correct location of globus.
> 
> -----Original Message-----
> From: Jim Basney [mailto:[email protected]]
> Sent: Fri 10/9/2009 7:04 PM
> To: Muhammad Sarwar
> Cc: [email protected]
> Subject: Re: [gt-user] globus-job-run: line 24:       
> /libexec/globus-script-initializer: No such file or directory
>  
> The GLOBUS_LOCATION environment variable isn't set, so the following
> line in the globus-job-run script
> 
>   . ${GLOBUS_LOCATION}/libexec/globus-script-initializer
> 
> turns into
> 
>   . /libexec/globus-script-initializer
> 
> causing the "No such file or directory" error.
> 
> Muhammad Sarwar wrote:
>> Hi,
>>
>> I am trying to execute a script using globus-job-run. Script executes 
>> successfully when i do globus-job-run from the terminal and stage the script 
>> file. But when i try to execute the same command from within the java code 
>> by getting a runtime object and then executing the globus-job-run command, 
>> it fails with following values in error stream:
>>
>> Values in Error stream:
>> /opt/globus/bin/globus-job-run: line 24: /libexec/globus-script-initializer: 
>> No such file or directory
>>
>>
>> same script was executing very well as of yesterday from within java code. I 
>> am not able to understand what is going on. Any help will be appreciated.
>>
>> Thank you,
>>
>> Sulman.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to