VMware Aria

 View Only
  • 1.  Easier Way to Detect Rhino Engine Version

    Posted Nov 21, 2022 07:29 AM

    Aria uses the JavaScript engine Rhino, this becomes visible in the section Scripting Engine of the current Key Features of the Orchestrator Platform. I do not find a way to detect the used version of the Rhino engine via a method call or similar, so I performed a manual detection via available functions. To evaluate this I looked at the changes in the releases of the Rhino engine. From release 1.7R5 to release 1.7.6, for example, the method string.trimLeft() was added. I used this method to try a simple test.



    As you can see, the current version supports the method trimLeft(), whereas version 1.7R5 does not support this method. This is also displayed in the vRA.


    Besed on this result we can assume with high probability that vRA version 8.11 uses Rhino Engine version <= 1.7R5. The documentation describes that the Orchestrator 7.6 uses Rhino Engine version 1.7R4, in the document vrealize-orchestrator-76-developers-guide.pdf. The current key features of the Orchestrator platform talks, in the Scripting engine section, about the Mozilla Rhino JavaScript engine, without any version information.

    Is there an easier way to detect the used version of the Rhino JavaScript engine?

    In my opinion it should be possible to detect the Rhino version with the following script sequence:

    var Context = org.mozilla.javascript.Context;
    var currentContext = Context.getCurrentContext();
    var rhinoVersion = currentContext.getImplementationVersion();

    You can find here the documentation of the Rhino classes.


    But for this it is necessary to set the access to the Java classes.

    Here is the result of a search of the pattern rhino*.jar:



  • 2.  RE: Easier Way to Detect Rhino Engine Version
    Best Answer

    Posted Dec 17, 2022 10:35 AM

    With a tiny modification of the JavaScript code and the access to the package org.mozilla.javascript all works well.


    Great to know how it is possible to detect the version of used Rhino engine.