/**
*
* @return true if we are running in non-interactive no UI mode
+ * based on System.getProperty("java.awt.headless")
*/
public static boolean isHeadless()
{
return f.toString();
}
+ private static float javaVersion;
+
+ public static float getJavaVersion()
+ {
+ if (javaVersion == 0)
+ {
+ try
+ {
+ return javaVersion = Float.parseFloat(
+ System.getProperty("java.specification.version"));
+ } catch (Exception e)
+ {
+ javaVersion = 1.8f;
+ }
+ }
+ return javaVersion;
+ }
+
}