java version set to 1.7 and type cast fix