This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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: 37865
    
  22
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:
 
wood burning stoves
 
subject: launch another terminal app from within a console app
 
Similar Threads
Launching file under Linux/Unix?
Starting a process and using STDIN/STDOU/STDERR
why rmiregistry doesn't work?
tomcat console prints - stopping
memory and layouts