I have a question about ProcessBuilder.
I try to control MS-DOS program.
The program name is CARI-6M.
You can download http://www.faa.gov/data_research/research/med_humanfacs/aeromedical/radiobiology/cari6m/ .
The CARI-6M has text GUI environment.
I don't know to write key "1" using OutputStream.
The writing method does not run on windows 7.
please help me~~~~~!!~~.
Tony Docherty wrote:Welcome to the Ranch,
Can you explain exactly what you are trying to do and what doesn't work. Does it not compile, not run, run but not do what you want (if so what does it do) etc.
Sorry I'm not good at English. I'm Korean.
I'm trying to get cosmic ray dose using the CARI-6M program.
The CARI-6M is MS-DOS program has text GUI.
I want to input keys instead of human's typing on background process.
Could you advise some solution?
I modified the source.
hoon kim wrote:Sorry I'm not good at English. I'm Korean.
Don't worry, your English is a lot better than my Korean.
hoon kim wrote:The CARI-6M is MS-DOS program has text GUI.
text GUI doesn't really make sense, it is either a text based CLI (Command Line Interface) or a GUI (Graphical User Interface). I guess you mean CLI as it's a MS-DOS program.
I suggest you add lots of print statements in your code so you can see what lines are running and where it is getting stuck. You might want to look at the way readLine() works - what happens if it blocks waiting for input.
Using Process is more difficult than you might think. There are a number of things you have to be aware of, I suggest you read http://www.javaworld.com/article/2071275/core-java/when-runtime-exec---won-t.html.
Please do not post personal information on a public forum - I have removed it for you.
If you want to contact the OP about this thread then please read http://www.coderanch.com/how-to/java/UseTheForumNotEmail for information on why you should post your question/advice here.
If you want to contact the OP for personal reasons then click on his/her name to go to their profile and use their email address or PM them.
Wanchul Lee wrote:Dear Tony Docherty,
I am so sorry. Currently I also run the CARI-6M to calculate radiation dose and I found his question through googling. I just want to communicate with him in our mother tongue. If my post disturb your policy, would you please accept my appology.
It's not against our policy for you to want to communicate with another member but we don't allow personal information such as email addresses, telephone numbers etc in posts so I removed that information. But don't worry you have not offended us and we hope to see you again on the forum.