fixed java 7 and 8 to work with debian