the code works fine for a stand alone java application , but if the same
code is written in a servlet, it does not work.

> ----------
> From:         Andrew Craig[SMTP:[EMAIL PROTECTED]]
> Reply To:     A mailing list about Java Server Pages specification and
> reference
> Sent:         Tuesday, July 11, 2000 5:48 PM
> To:   [EMAIL PROTECTED]
> Subject:      Re: Using Runtime.getRuntime().exec() function
>
> You are trying to exec a program called "java ApplicationName" by doing
> that.
>
> Instead try :
>
> String cmd[]=new String[2];
> cmd[0]="java";
> cmd[1]="ApplicationName";
> try {
>         Runtime.getRuntime().exec(cmd);
> } catch(java.io.IOException e) {
> }
>
> As far as I remember this should work...
>
>
> Andrew
>
>
> > -----Original Message-----
> > From: Ritesh_Srivastava [mailto:[EMAIL PROTECTED]]
> > Sent: 11 July 2000 13:06
> > To: [EMAIL PROTECTED]
> > Subject: Using Runtime.getRuntime().exec() function
> >
> >
> > Runtime.getRuntime().exec("notepad") works but
> > Runtime.getRuntime().exec("java  ApplicationName") does not works.
> >
> > What can be the possible reason.?
> > Ritesh
> >
> > ==============================================================
> > =============
> > To unsubscribe: mailto [EMAIL PROTECTED] with body:
> > "signoff JSP-INTEREST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.html
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> >
>
> ==========================================================================
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to