This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread 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 Android Security Essentials Live Lessons this week in the Android 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: 19656
    
  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: 38075
    
  22
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: 38075
    
  22
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.
 
wood burning stoves
 
subject: java runtime.exec()
 
Similar Threads
Plugin for Decrypting Data Source Passwords in Jboss
Error messages given by Sun's Java Compiler
Can final method be overridden?
CAN OBJECT BE PUBLIC?
javax.sql.DataSource query?