Hi, 

Thanks for your response.  I have given the following instruction to the
code. when i executes it displays the user name as 'root'.

i am getting the exception 'java.io.IOEXception:/opt/gsscript/gs.sh not
found'


Please provide sufficient information

Thanks
Jithesh




Rob Hills wrote:
> 
> Hi Jitesh,
> 
> jithesh wrote:
>>    i am using appfuse 1.9.4 for building my web app. my java class
>> executes
>> a shell script that creates an image file to the destination path. But
>> when
>> run the application the shell script is not getting executed. My code to
>> call the shell script is given below
>>
>>      Runtime runtime = Runtime.getRuntime();
>> runtime.exec("/opt/gsscript/gs.sh").waitFor(); 
>>
>> If i execute the shell script from the terminal the image is getting
>> generated.
>>
>> I am using websphere 1.1 application server for deployment. Can any one
>> suggest the solution for this problem. My application is having root
>> privileges.
> Are you certain that Websphere is running as root?  I understand that 
> running a web server as the root user creates quite a substantial 
> security risk and should be avoided at all costs.  If you haven't done 
> so already, try printing the output of System.getProperty("user.name") 
> to a log file and that will tell you what user your system is running as.
> 
> Then, what errors are you getting when you run your script?  What output 
> are you getting from the output and error streams (as discussed earlier: 
> http://www.nabble.com/Re%3A-shell-script-in-java-p13489527s2369.html)?  
> What return value are you getting from your script?
> 
> HTH,
> 
> Rob Hills
> Waikiki,  Western Australia
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/invoking-shell-script-from-java-tf4766516s2369.html#a13644513
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to