| Author |
Problem in eclipse IDE Galileo
|
kumarjit banerjee
Ranch Hand
Joined: Mar 27, 2011
Posts: 32
|
|
Hi,
I am facing a problem in eclipse IDE.
In the above code, The exception is printed at different locations when run successively. The ideal output, which I got from running in command prompt, should be
But when run successively I got the output as above and also different output such as
|
 |
Jesper de Jong
Java Cowboy
Bartender
Joined: Aug 16, 2005
Posts: 12950
|
|
That is because e.printStackTrace(); prints to a different output stream: System.err instead of System.out.
The System.out and System.err streams by default do both write their output to the console, but they are not synchronized with regard to each other. Therefore, the order of messages as they appear on the console via those two streams is not predictable.
|
Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19232
|
|
|
Eclipse is notorious for mixing System.out and System.err in unpredictable ways.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
 |
|
|
subject: Problem in eclipse IDE Galileo
|
|
|