Home arrow static arrow Java Programming [Archive] - help with Runtime class
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - help with Runtime class
This topic has 5 replies on 1 page.

Posts:2
Registered: 6/21/04
help with Runtime class  
Jul 30, 2004 10:07 AM



 
This isn't exactly the most advanced programming, but I'm having trouble locating a good documentation on this.

First off, let me state I'm using Linux. Second, here is the code I've been messing with thus far:

Runtime run = Runtime.getRuntime();
Process p;
System.out.println(System.getProperty("os.name"));
try {
p = run.exec("gnome-terminal");
System.setOut(new PrintStream(p.getOutputStream()));
}
catch (IOException ex) {
}

Okay, so I have this IDE I'm writing and here are some things I'd like to be able to do:
1) Manipulate output streams and display them in the IDE.
2) Be able to manipulate the input streams and display the resulting output stream in the IDE.
3) Launch other executable files from the IDE and display the resulting output stream in the IDE.

Any help on this would be appreciated, thanks.

~Les
 

Posts:2,399
Registered: 10/26/00
Re: help with Runtime class  
Jul 30, 2004 10:56 AM (reply 1 of 5)



 
You will need to hook up Threads to read and write to the process streams. It is not easy.
 

Posts:2
Registered: 6/21/04
Re: help with Runtime class  
Jul 30, 2004 12:39 PM (reply 2 of 5)



 
I see. Do you know of any sample/example scripts that demonstrate this?
 

Posts:2,206
Registered: 8/15/02
Re: help with Runtime class  
Jul 30, 2004 12:42 PM (reply 3 of 5)



 
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

third time today. Jeez, do people think hteir problems are unique!
 

Posts:31,095
Registered: 4/30/99
Re: help with Runtime class  
Jul 30, 2004 1:29 PM (reply 4 of 5)



 
Perhaps there should be something in the forum software that automatically responds with that link whenever it sees the word "Runtime" in a post.
 

Posts:2,206
Registered: 8/15/02
Re: help with Runtime class  
Jul 30, 2004 1:31 PM (reply 5 of 5)



 
Wonder how may hits it gets?
 
This topic has 5 replies on 1 page.