Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / May 2006

Tip: Looking for answers? Try searching our database.

please help @ TerminalWindow

Thread view: 
vikas talwar - 24 May 2006 14:18 GMT
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.

--
Thanks & Regards
Vikas Talwar
Patrick - 24 May 2006 16:01 GMT
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.
vikas talwar - 25 May 2006 12:55 GMT
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 !!


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.