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?
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.