This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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


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
Rancher

Joined: Mar 22, 2005
Posts: 42958
    
  73
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.
 
Have you checked out Aspose?
 
subject: Console application executing from Java
 
It's not a secret anymore!