I understood that anything to standard out (System.out
) would appear in the Java Console window (when it\'s enabled). I spotted somewhere though that there might be
One situation I can think of is to invoke System.setOut(null)
(orSystem.setOut(any OutputStream other than System.out or System.err)
) then the console, if exists, would show nothing.
The only way you wouldn't see System.out
output in the console is if the method System.setOut
has been invoked. This method is invoked to redirect output to the graphical Java Console, but I don't know of any other realistic circumstance in which it would be redirected away from the Java Console unless you do so voluntarily.
Depending on terminal settings it can happen that the output is not written until a newline character is sent as well. So if you do System.out.print("test")
it might not appear immediately.
On Windows this is usually not the case, but on Unix terminals this is quite common.
Perhaps you use javaw to start virtual machine, this version will not show console messages. You can use java to start the virtual machine, which will show the console message.
javaw is intended for apps with windows, java is intended for console apps.
Same thing happened to me. I could not get System.out.println or Logger.debug either on console.
If you are on a huge project in Eclipse or whatever, you can read below.
Solution: I realized that I had not committed jars and some java files to SubVersioN on network. thats all. Project had not been compiled.