fixed java6 compatibility and let travis build only against openjdk6