/** * @param name * @param optimizationLevel * @param clazz */ public JavaScriptExecutorFast(final String name, final int optimizationLevel, final Class<?> clazz) { try { LOGGER.info("Try v8 executor"); this.executor = new JavaScriptExecutorV8(name, clazz); } catch (final NoClassDefFoundError e) { LOGGER.info("Fallback to rhino executor"); this.executor = new JavaScriptExecutorRhino(name, optimizationLevel, clazz); } catch (final UnsatisfiedLinkError e) { LOGGER.info("Fallback to rhino executor"); this.executor = new JavaScriptExecutorRhino(name, optimizationLevel, clazz); } }