File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Console application executing from Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Console application executing from Java " Watch "Console application executing from Java " New topic
Author

Console application executing from Java

Imre Tokai
Ranch Hand

Joined: Jun 04, 2008
Posts: 130
Hello!


I'm executing a C++ application that contains GUI from Java via Runtime.getRuntime().exec( cmd ), and it's working properly.
When I want to execute C++ console application it doesn't seem to return information that it's finished and remains to hang.
Even C++ code part behaved as expected.

Here is the whole example:



How to call the C++ console application from Java properly, with notification that will avoid hanging?


Regards
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42906
    
  69
I don't see any code that would handle the process' input, output and error streams. Read and follow the article "When Runtime.exec() doesn't" by Daconta; it explains all this.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Console application executing from Java