aspose file tools*
The moose likes Java in General and the fly likes How to get Output from command prompt into java console Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to get Output from command prompt into java console" Watch "How to get Output from command prompt into java console" New topic
Author

How to get Output from command prompt into java console

Kunal Mittal
Greenhorn

Joined: Mar 25, 2010
Posts: 2
Guys i am facing a problem that is that i need to run few commands in command prompt through java. And i dont want to display command prompt and i want the output that would come in command prompt to come in java console.
Partially i have done the job by using a process and using runtime command. I am calling the inputstreambuffer to get it.
Now the problem is that at times i need to press enter to execute the command in command prompt so it hangs in java. Any Solution guys??

Do let me know if you want the code to know more about the problem.
Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

Your post is almost without details and without code so I don't see how we can help you.


"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
 
Don't get me started about those stupid light bulbs.
 
subject: How to get Output from command prompt into java console