I'm having trouble with NTVDM or CMD.EXE.
I have have to use an old DOS based program here at work.
This program contains a series of smaller executables that can be run inpedependenty.
These executables are traditionally run from the command line in the form
C\:>DC <program name>
where "<program name>" is the "project" you wish to process.
The DC program then runs and pops up a dos menu of options and asks to select an option to execute on the file.
I can run this program from the command line perfectly using either the command "C:\DC.EXE <Program Name>" in which only the NTVDM.EXE process executes but the DC program executes and displays correctly.
If I type into the command line "cmd.exe /c c:\dc.exe <program name>", both the NTVDM.EXE and CMD.EXE processes run and the program displayes correctly.
However when I attempt to call either of the above commands from the Runtime.exec() or process builder programs, Both CMD.EXE and NTVDM.EXE processes run but don't display the Menus or return the stream (input or error) to my program. This causes the program to hang at process.waitFor() untill I Kill the NTVDM.EXE process in Task manager.
If I could display the program output for a user to select the menu I would be fine, I would preferrably like to automatically select option "3" by sending a "3" to the program on display of the Menu.
I've read and attempted to implement the different code samples from "http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html?page=1",
"http://www.rgagnon.com/javadetails/java-0014.html" and "http://mindprod.com" but am getting the same issues every time. I'm handling the input streams etc but cannot seem to get a response.
Anyone got any ideas how to implement this?