added support to use java 7.