• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

launch another terminal app from within a console app

 
glok twen
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 49472
64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks it worked. i did this:

in java:

launch_tmp.py:

tmp.py:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic