Urgent: call a Dos application
When I run myDosApp.exe from DOS, a screen appears and my app runs fine. However,
when i use:
Process p = Runtime.getRuntime().exec(c:/myDosApp.exe); p.waitFor();
the app runs but I get no screen to appear thru my java app. I've heard of
using START in front of myDosApp.exe to get a DOS window, but the START command
throws off my p.waitfor(); and the waitfor() thinks it's done b4 myDosApp
actually finishes.
I need to know how to get myDosApp.exe to appear on the screen thru my java
app without using the DOS start command. Thank you
Re: Urgent: call a Dos application
If your DOS program only produces console output and then terminates, you
could redirect the output to a file (c:/myDosApp.exe >output.txt) and then
show the contents of that file in a Java window. But if you want the DOS
program's window to be inside a Java window, where you perhaps key input and
it displays output, you can't do that in Java because it would be
platform-specific. You'd need some kind of native method to handle this.
Timouyas Abdessamad <timouyas@mailcity.com> wrote in message
news:38eb6874@news.devx.com...
>
> When I run myDosApp.exe from DOS, a screen appears and my app runs fine.
However,
> when i use:
>
> Process p = Runtime.getRuntime().exec(c:/myDosApp.exe); p.waitFor();
>
> the app runs but I get no screen to appear thru my java app. I've heard of
> using START in front of myDosApp.exe to get a DOS window, but the START
command
> throws off my p.waitfor(); and the waitfor() thinks it's done b4 myDosApp
> actually finishes.
>
> I need to know how to get myDosApp.exe to appear on the screen thru my
java
> app without using the DOS start command. Thank you
>