Hi Ashish,

Yes you can. Use the following version of
Runtime.exec:
         runtime.exec(String[] args)
and set the first arg to "sh -c" and the
second to your script name.

Regards

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Vasudev Ram
Infosys Technologies Limited
Pune, India
Email : [EMAIL PROTECTED]
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

> -----Original Message-----
> From: ASHISH_GARG [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, December 20, 1999 8:43 PM
> To:   [EMAIL PROTECTED]
> Subject:      A Java Query
>
> Hi,
>     I am sorry for posting a Java Query on Servlet mailing list.
> My query is: Can I run a shell script using 'exec' command of 'Process'
> class in Java ? I can run a batch file on dos but I am not able to run a
> shell script. If somebody can help I would be grateful.
> Regards
> Ashish
>
> __________________________________________________________________________
> _
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to