Results 1 to 4 of 4
- 05-25-2010, 08:17 PM #1
Member
- Join Date
- May 2010
- Posts
- 3
- Rep Power
- 0
How to return command prompt error message
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..
JXXX Compiler Service
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..
- 05-25-2010, 10:58 PM #2
Senior Member
- Join Date
- Mar 2010
- Posts
- 266
- Rep Power
- 4
Please note my code is approximate, make sure to look up the API
Java Code:Process p = System.getRuntime.exec("yourcommand.exe"); InputStream is = p.getInputStream(); // read from that stream...
- 05-26-2010, 05:02 PM #3
How are you doing the compile? If using Runtime and Process class, they have methods to get Streams for program's output. See above.compile a java file on my own server and returning its output.
- 05-26-2010, 05:15 PM #4
Member
- Join Date
- May 2010
- Posts
- 3
- Rep Power
- 0
Similar Threads
-
CORBA command prompt
By ntagrafix in forum Advanced JavaReplies: 2Last Post: 04-06-2010, 11:35 AM -
Command Prompt Java
By kelvinsmj in forum New To JavaReplies: 8Last Post: 11-27-2009, 10:30 AM -
How to run a project with the command prompt?
By TexanProgrammer in forum NetBeansReplies: 4Last Post: 08-05-2009, 10:19 PM -
how to get the values from command prompt
By tej in forum New To JavaReplies: 3Last Post: 05-02-2009, 08:32 AM -
help me!!!! about command prompt..
By kureikougaiji in forum New To JavaReplies: 2Last Post: 11-13-2008, 06:15 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks