upgrade to java 8 and correct naivebayes