Following beast2 to java 8.