This content has been marked as final. Show 6 replies
I am on XP, Java 1.6.0_11 and it works for me by using "cmd /C whatever16.exe".
There may be some other reason, not the fact that it is 16 bit.
Can you post the full error stack?
yeah i tried on some other 16 bit programs and it executes them, so it seems thats not the problem. the error i mentioned was being given to the command line without cmd.exe /c some.exe So thats not the case either. I found
that it doesn't show output unless program is terminated. And if program is waiting for keyboard stroke it doesn't accept it through inputstream of java, which i have in my code. So problem for me now is how to get output form program while it is still running and how to give keyboard stroke input to program expecting such an input. i need a resource suggestion or any kind of help explaining these points. please help me out...
Did you read this [http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html] and you have no problems with 32 bit programs?
Thats a very good tutorial. Thanks for it. I will try some those things and post the result. No problem now is not 16 bit or 32 bit. Problem is to handle input of the program to be executed. i.e if it is is expecting a keyboard input i have to write that input in my output stream. i will try that and post result.
Yes, it all worked well. It was some silly programming from me. Really thanks for that tutorial. I got my answers.
Good! Now, please take a look at the ProcessBuilder class, which is the new way of doing what Runtime does.
Many things from the article still apply, but ProcessBuilder relieves you from all the multithreaded mess: it allows you to
combine stdout and stderr into a single stream.