| Author |
Simple program that executes from console and opens another console
|
Sandra Bachan
Ranch Hand
Joined: Feb 18, 2010
Posts: 434
|
|
Hello,
I would like to create a simple program (no applets, no graphics) that executes from the console to open another console. I have searched the internet and these forums, but cannot find the particular Java 6 API that creates a console, and launches it from an existing console. Please help.
|
Marriage Made in Heaven
http://www.youtube.com/user/RohitWaliaWedsSonia
|
 |
marc weber
Sheriff
Joined: Aug 31, 2004
Posts: 11343
|
|
This is platform specific, of course, but I'm guessing...
See this page for more details.
|
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32675
|
|
|
And always read Michael Daconta's classic article which you can find by Googling for Michael Daconta when Runtime.exec() won't, before going anywhere near Runtime.exec().
|
 |
Sandra Bachan
Ranch Hand
Joined: Feb 18, 2010
Posts: 434
|
|
|
Well, my code needs to be compatible to unspecified Operating Systems. Wanted to create program in order to study of SCJP6 Certification Exam. Guess I'll have to use Applets...
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32675
|
|
|
You cannot expect to call an operating system component (the command line, terminal or shell) without knowing its name. You can get the name of the operating system from the SystemgetProperty(java.lang.String) method, and you can create a Map linking operating system names to the commands to open a window, but even that is fraught with difficulty; not all Linux users use "bash" as their shell, for example.
|
 |
 |
|
|
subject: Simple program that executes from console and opens another console
|
|
|