Java Portability

…this program below does nothing visible on Solaris, but prints “hello” with Sun Java SE on Linux and Windows:
public class Foo {
public static void main(String[] args) {
Thread.currentThread().interrupt();
System.out.println(“hello”);
}
}

First impressions of this program’s behavior on Solaris roughly translate to “The hell you say!” followed by “Java is broken on Solaris!” There are a number of “symptoms” of interruptible I/O that catch users off guard and in a few cases one is led to wonder if it might be best to do without this feature whose flip side is that it allows “breaking out” of I/O operations that folks really want to be able to escape from.