This is related to an earlier question by a different user, asking How to detect that code is running inside eclipse IDE.
I noticed that Eclipse always launches prog
Checking for System.console() didn't work for me, because of:
So I'm using following solution:
private static boolean isJavaw() {
try {
System.in.available();
return false;
} catch (IOException e) {
// invalid handle in case of javaw
return true;
}
}
Works fine with JDKs 5, 6 and 7.