List of usage examples for weka.core Version isOlder
public boolean isOlder(String o)
From source file:gui_pt.stream.DoTaskFromGui.java
License:Open Source License
/** * Checks if the Weka version is recent enough to run MOA. * For example, if the Weka version is not recent, there may be problems * due to the fact that <code>Instance</code> was a class before 3.7.1 and * now is an interface.// w w w . j a va2 s . c o m * * @return true if the Weka version is recent. */ public static boolean isWekaVersionOK() { Version version = new Version(); if (version.isOlder("3.7.1")) { System.err.println(); System.err.println(Globals.getWorkbenchInfoString()); System.err.println(); System.err.print("Weka 3.7.1 or higher is required to run MOA. "); System.err.println("Weka version " + Version.VERSION + " found"); return false; } else { return true; } }
From source file:moa.core.WekaUtils.java
License:Open Source License
/** * Checks if the Weka version is recent enough to run MOA. * For example, if the Weka version is not recent, there may be problems * due to the fact that <code>Instance</code> was a class before 3.7.1 and * now is an interface.//from w ww .ja v a 2 s . c om * * @return true if the Weka version is recent. */ public static boolean isWekaVersionOK() { try { Class.forName("weka.core.Version"); Version version = new Version(); if (version.isOlder("3.7.1")) { System.err.println(); System.err.println(Globals.getWorkbenchInfoString()); System.err.println(); System.err.print("Weka 3.7.1 or higher is required to run MOA. "); System.err.println("Weka version " + Version.VERSION + " found"); return false; } else { return true; } } catch (ClassNotFoundException exception) { // It is not available return true; } }