* Get the optimization level of the Rhino JavaScript engine.
 * @author Stefan Schnell <mail@stefan-schnell.de>
 * @license MIT
 * @version 0.1.0
 * Set in the control center the system property
 * com.vmware.scripting.javascript.allow-native-object to true.

var contextFactory = org.mozilla.javascript.ContextFactory();
var context = contextFactory.getGlobal().enterContext();
var optimizationLevel = context.getOptimizationLevel();
System.log("Optimization Level: " + optimizationLevel);

vmware aria orchestrator optimization level detection

VMware Aria Automation uses always the optimization level -1. That means that the interpretive mode of the Rhino engine is used.

This site is part of blog.stschnell.de