Two Laptop Bag
The moose likes Beginning Java and the fly likes Simple program that executes from console and opens another console Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Simple program that executes from console and opens another console" Watch "Simple program that executes from console and opens another console" New topic
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
    
    4
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
    
    4
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Simple program that executes from console and opens another console
 
Similar Threads
Invoking executables in Java
Is there possible of synchronize Execuation of Java program file
Why Java is slower?
Changing desktop icon for Javaw shortcut
Classes for printing into console