Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get Java error message from command line.

 
Rax Wer
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I am trying to compile a java file on my own server and returning its output. But if there is an error in file, we get the error message on command prompt. i just want to have that error message from command prompt and return it to the user...

One example is this link..

[url]http://www.innovation.ch/java/java_compile.html
[/url]
Submit a java file with an error. It will give you error message. I want the same thing. But dont know how this can be done.

Thanks in Advance..


 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure what this has to do with JDBC?

I'm guessing you are running the java compiler with ProcessBuilder? You can get the output stream from the process after you start it.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34695
367
Eclipse IDE Java VI Editor
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic