Possible Duplicate:
How can I check if a Java program's input/output streams are connected to a terminal?
I'd like to be able to have a problem behave differently when being run interactively versus in an automated way. In Python, you can use sys.stdout.isatty
to detect this (see this question). Is there an equivalent in Java?