fix some Java Errors for Java 1.7