refactoring and removing the java 6 cross compilation