Hi,
Along with this I think u need to specify the
full directory path starting from the root...
it dosent work if u specify ./scriptname .
This will work fine from applications on command
line bcas it konws where the program is running from.
please note that u need to specify the shell also
as mentioned in the following "cmd" string...
H.M.Mallik
>try
> String command = "find_firm.csh some_parameters";
> String [] cmd = {"/bin/csh", "-c", command};
>
>>>>>>>>>>>>>>>>>>>>>>>>>>
> >-----Original Message-----
> >From: A mailing list for discussion about Sun Microsystem's Java Servlet
> >
> >
> > Hi, All,
> >I guess that I'm missing something very simple here:
> >I'm trying to run a shell script from my servlet as:
> >......
> > Process process = null;
> > Runtime runtime = Runtime.getRuntime();
> >.......
> > String [] command = {"find_firm.csh", "some_parameters"};
> > process = runtime.exec(command);
> >
> >And I get an error:
> > java.io.IOException: find_firm.csh: not found
> >
> >The script, find_firm.csh, has 'r' and 'x' permissions for everybody,
> >it is in the same directory where my servlet class is, and I start
> >servletrunner
> >with servlet dir = to this same directory...
> >I tried "./find_firm.csh" -- the same result.
> >Needless to say that I run this script from a command line with no
> >problems.
> >
> >Any suggestions?
> >Thanks,
> >Marina
> >
> >_____________________________________________________________________
_______________________________________________________________
Get Free Email and Do More On The Web. Visit http://www.msn.com
___________________________________________________________________________
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