Skip to content

To Redirect Error Messages from Command Prompt

February 12, 2010
tags: ,

When redirecting output from an application using the “>” symbol, error messages still print to the screen.  This is because error messages are often sent to the Standard Error stream instead of the Standard Out stream.  To redirect STDERR  specify “2>”  by which the error messages are redirected to the specified channel

eg : javac 2> compileerror.txt

The compilation errors are captured in the compileerror.txt file.

No comments yet

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: