2 Replies Latest reply: Feb 19, 2011 3:07 PM by jschellSomeoneStoleMyAlias RSS

    System.out.println() Ignored

    806492
      I have a open source JDBC driver which has to be enhanced.

      It is compiled with ant. I tried to code in my new methods for enhancing it and wanted to print the intermediate variables through System.out.println(). This particular line for printing onto the console is ignored and remaining code is working fine.

      Can someone tell me where I went wrong?
        • 1. Re: System.out.println() Ignored
          796440
          Junnu wrote:
          Can someone tell me where I went wrong?
          You went wrong in assuming that line is "ignored." It's not. So one of the following must be true:

          1. That line is never reached because the code branch it's in is not executed.

          2. That line is never reached because an exception occurs.

          3. That line is being executed, but System.out has been redirected away from the console by System.setOut().

          4. That line is being executed, but System.out has been redirected away from the console by the command line, such as using > in linux.

          5. That line is being executed, but there's an error. Try System.out.checkError().

          6. That line is being executed, but System.out's buffer has not filled up so it's not appearing on the terminal. System.out.flush() would fix this, but this is not a likely scenario. I think that System.out is created with autoflushing enabled, but I may be mistaken.
          • 2. Re: System.out.println() Ignored
            jschellSomeoneStoleMyAlias
            One more to the list...

            It didn't actually build or wasn't deployed. So the old code is still running.