 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Rafael Pabst Guest
|
Posted: Mon Nov 24, 2003 7:09 pm Post subject: Problem with Runtime.exec in Java. Buggy? |
|
|
Hello Folks,
I deal with the following problem.
I would like to start a DOS-Program(which needs dos4gw.exe) under Windows.
The Shell Command given down is correct: I tried it under the
Windows-Commandshell and it works fine.
Now I have following program in Java which should do quite the same:
try{Process p = Runtime.getRuntime().exec("d:\ascsrc\dos4gw.exe
d:\ascsrc\a2m204.exe d:\ascsrc\Awi_l1.asc d:\ascsrc\Awi_l1.mat");
DataInputStream ls_in = new DataInputStream(p.getInputStream());
while ((ls_str = ls_in.readLine()) != null) {
System.out.println(ls_str);
}
}catch (IOException e){e.printStackTrace();};
.... but unfortunality it appears (or happened) nothing, not even an error
like an IOException or something else. I also tried the getErrorStream
method and thought that this would produce an errorstream, but it doesn't.
Has anyone of you an idea, of what is going on here?
Many thanks in advance
Rafael
|
|
| Back to top |
|
 |
VK Guest
|
Posted: Mon Nov 24, 2003 9:22 pm Post subject: Re: Problem with Runtime.exec in Java. Buggy? |
|
|
use the most generic
.... catch (Exception e) {System.out.println(e.toString());}
My first guess is that this is SecurityException
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|