please help @ TerminalWindow

V

vikas talwar

Hi everyone,

I need to call a command line application from my java application.
For that I want to create terminal window within my application where I
can show the output of the application I'll call.

As eclipse or VC++ do. They compile & execute the source code within
their application and show the output in their own status-window.

Can I open terminal on my JWindow (or any java component) or I have to
catch the stdout of the child application and show it in text-box. If
yes how could I do this.

Please help.
 
P

Patrick

vikas talwar a écrit :
I need to call a command line application from my java application.
For that I want to create terminal window within my application where I
can show the output of the application I'll call.

Process p = Runtime.exec ("app.exe");
InputStream input = p.getInputStream ();
// this is data piped from the standard output stream of the process
// you can then fill your JTextArea etc.
 
V

vikas talwar

Thanks, it works.

But now i'm into bigger problem.
The application which i'm calling is too heavy (takes 1 hr to complete)
and produce lot of log.

Can I use threading between getInputStream and print_to_TextArea ???
If Yes, it is going to increase the execution time of my child
application.

Any suggestion !!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,801
Messages
2,569,658
Members
45,422
Latest member
KerryFalco

Latest Threads

Top