Christian Biermann wrote:
>
> Hello
>
> I have a problem with a proxy Server which is written in java.When I get
> error-messages like "NoRoutetoHost-Exception", they are thrown out on my
> console (stdin).How can I route this error-messages into a file or to
> /dev/null?
> I think this is a option of the javaVM and not one of the program!
A line somewhere in the program is outputting those messages. One
solution is to change the program to send the messages to a file.
Programs in Linux and Unix have two output channels, stdout and stderr -
they typically send normal output to stdout and error output to stderr.
Java has the same thing, in the System.out and System.err streams. You
can redirect either output by doing something like this:
java ...command... >file1 2>file2
Any stdout output is redirected into file1, while any stderr output is
redirected into file2. Note that these are not JavaVM options, it's the
Linux shell that is handling the redirection and it works the same way
with all programs (not just Java).
Nathan
>
> bYe
> Chris
>
> ----------------------------------------------------------------------
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]