Following beast2 in updating to java 8.