Added a workaround for openjdk6. No problem exists for Sun's jdk6