Replacing java 6 with java 7