double version = Double.parseDouble(Runtime.class.getPackage()
.getImplementationVersion().replaceFirst("^(\\d\\.\\d).*", "$1"));
if (version < 1.8) {
compiler = new RhinoCompiler(options, loader, less, env, engine, cssmin, sourceMap);
} else {
compiler = new NashornCompiler(options, loader, less, env, engine, cssmin, sourceMap);
}
} catch (Exception e) {
logger.error("LESS Engine intialization failed.", e);
}
}