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 launch another terminal app from within a console app 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 "launch another terminal app from within a console app" Watch "launch another terminal app from within a console app" New topic
Author

launch another terminal app from within a console app

glok twen
Greenhorn

Joined: Jul 02, 2007
Posts: 9
hi. let's say i have a console app. while that app is running, i want to launch another, separate terminal app. and, within that second terminal, start another java console application. do you know how to do this?

understand it may need to be os specific, that's ok. just want to make it work on windows and linux.

thanks, gt.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39396
    
  28
Too difficult a question for us beginners. Moving.

It might work if you put the "java" instruction and all its parameters into a Runtime.exec() call. If you are not experienced with Runtime.exec(), find the classic Daconta article when Runtime.exec() won't and read it carefully.
jittu goud
Ranch Hand

Joined: Mar 30, 2007
Posts: 46
you need to call some batch file..from your java application...
which does the job of opening the new command window...and runs what ever you mentions in batch...... ;)
use
glok twen
Greenhorn

Joined: Jul 02, 2007
Posts: 9
thanks it worked. i did this:

in java:

launch_tmp.py:

tmp.py:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: launch another terminal app from within a console app