This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Java in General and the fly likes exec java program under linux Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Reply locked New topic
Author

exec java program under linux

Gizzmo Zeuzere
Ranch Hand

Joined: May 11, 2001
Posts: 45
Hello, I want to run java program in a java program. When i do this :
Process p = Runtime.getRuntime().exec(jav);
try{
p.waitFor();}
catch(InterruptedException ire){}
InputStream is = p.getErrorStream();
BufferedReader br =new BufferedReader(new InputStreamReader(is));
while(br.readLine() != null)
{ agl.console.append(br.readLine()); }
}
catch(IOException ioe){}
where jav="java prog"
It works under windows but not under linux, i don't understand. Can anybody helps me
?
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
Please don't post duplicate posts in different forums. Followups can go here.


"I'm not back." - Bill Harding, Twister
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: exec java program under linux
 
It's not a secret anymore!