Hi, Celeste. Yup you can use Process P = Runtime.getRunTime().exec(
"your Dos command / batch file call);
You can even run an external app even if the external app asks for
parameters after running it (e.g. running telnet which asks for password)
and you can even communicate with it from within your app! Good heh......
hth.
> -----Original Message-----
> From: Haseltine, Celeste [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, August 24, 2001 8:01 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Launching an exe from either a JSP or within Java
>
> Thank you so much J. Babu and Richard Lee!!!! I knew there was a way to
> do
> it in Java, I just could not find it in the JavaDocs or any of my
> reference
> books.
>
> Celeste
>
> -----Original Message-----
> From: J. Babu [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 23, 2001 7:00 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Launching an exe from either a JSP or within Java
>
>
> Hi,
> do like the following:
> Process P = Runtime.getRunTime().exec( "your Dos command / batch file call
> ");
> // i prefer you write one batch file, an call using above command.
> p.waitfor(); // to complete for the processing
>
>
>
> Hope this helps
>
> Babu
>
>
>
> -----Original Message-----
> From: Haseltine, Celeste [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 23, 2001 7:38 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Launching an exe from either a JSP or within Java
>
>
> This is a third party exe, and I just want to lauch it as an external
> application. Once the printing is stopped, the user would go back
> manually
> to the java app that launched the external application So if I wanted to
> emulate the following Dos command:
>
> C:\LMWPrint.exe /E=(jane, doe) <HIT ENTER KEY>
>
> How would I do that in Java? I find it hard to believe that I would need
> to
> use JNI, or write a C++ wrapper just to launch an external exe. Is there
> any other way to emulate the above DOS command line in Java?
>
> Celeste
>
> -----Original Message-----
> From: Jacek Antoniuk [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 23, 2001 6:16 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Launching an exe from either a JSP or within Java
>
>
> You can use JNI interface - but you would have to recompile your external
> application or write in C/C++ an app that calls your exe.
> ----- Original Message -----
> From: "Haseltine, Celeste" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, August 23, 2001 7:12 PM
> Subject: Launching an exe from either a JSP or within Java
>
>
> > Does anyone know how you can launch another exe resident on the host
> server
> > from within a JSP or in a Java class bean? I have found a third party
> tool
> > that can send data to industrial printers from a DOS command line,
> inclusive
> > of command line parameters. But for the life of me I cannot remember
> how
> to
> > "emulate" launching an executable from the command line in either Java
> or
> > JSP.
> >
> > Thanks in advance!!!
> >
> > Celeste
> >
> >
> ==========================================================================
> =
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> > 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".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> 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".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> 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
> The information in this email and in any attachments thereto is
> confidential
> and may be legally privileged. It is intended solely for the addressee.
> Access to this email by anyone else is unauthorized. If you are not the
> intended recipient, any disclosure, copying, distribution or any action
> taken or omitted to be taken in reliance on it, is prohibited and may be
> unlawful.
>
> ==========================================================================
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> 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".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> 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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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