This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Java in General and the fly likes java runtime.exec() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "java runtime.exec()" Watch "java runtime.exec()" New topic
Author

java runtime.exec()

victor piterson
Greenhorn

Joined: May 19, 2010
Posts: 4
i am trying to make a online compiler.and i had made it successfully but there is a small problem.
when i compile some file which has compiler error it will not compile.but i don't get any message.

so can anybody tell me how i can get the error in my application to disply it to user who is using my compiler..
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19678
    
  18

Start reading from both the process' input and error streams. If you use ProcessBuilder you can redirect the error stream to the input stream.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38467
    
  23
Welcome to the Ranch

Also Google for Michael Daconta when Runtime.exec() won't, which is the classic article about getting messages from a Process.
victor piterson
Greenhorn

Joined: May 19, 2010
Posts: 4
thank you very much bob,
my work is almost done . it's my major project.
but now i think why people need an online compiler.
just because it returns a class file. but a what user can do with this .class file.
can you give me some reason why people need online compiler.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38467
    
  23
victor piterson wrote:thank you very much bob,
. . . give me some reason why people need online compiler.
Who's Bob? Do you mean Rob?

You are supposed to find reasons for using an online compiler, if that is what you need for your work.
 
Don't get me started about those stupid light bulbs.
 
subject: java runtime.exec()