Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java runtime.exec()

 
victor piterson
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20552
57
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Start reading from both the process' input and error streams. If you use ProcessBuilder you can redirect the error stream to the input stream.
 
Campbell Ritchie
Sheriff
Pie
Posts: 49447
62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 49447
62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic