#1: change version to java8 and fix compile error and warning