fixed java6 compatibility and let travis build against oraclejdk6 and openjdk6