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 How to get Java error message from command line. 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 "How to get Java error message from command line." Watch "How to get Java error message from command line." New topic
Author

How to get Java error message from command line.

Rax Wer
Greenhorn

Joined: Mar 31, 2010
Posts: 12
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

Joined: Apr 14, 2004
Posts: 10336

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.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30353
    
150

Moving out of JDBC forum.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
Consider Paul's rocket mass heater.
 
subject: How to get Java error message from command line.