I like the check for /etc/passwd. For a second the thought that it might just be the most ghetto platform check heuristic ever blipped into my mind, and then I remembered that integer arithmetic is totally portable anyway so it doesn't matter -- and it's Java, so it doesn't matter. I hope OP actually saw this code in the wild somewhere; that'd be kind of amazing.