Adjusted for differences in Java and Python samples on Linux/Unix.