To find a way to detect the used Java version I would like to use the following script:
// Begin----------------------------------------------------------------
var javaVersion = java.lang.System.getProperty("java.version");
System.log(javaVersion);
// End------------------------------------------------------------------
However, the use of Java classes, other than java.util.*, is limited, they must be explicitly enabled. You can find a description how to set JavaScript access to Java classes here. I try that exactly as described, but it does not work.
1. Create file with name rhino-class-shutter-file in the directory /data/vco/usr/lib/vco.
2. Set system property com.vmware.scripting.rhino-class-shutter-file to vco/usr/lib/vco/rhino-class-shutter-file. This configuration is stored in the file vmo-managed.properties in the location /data/vco/usr/lib/vco/app-server/conf.

Different file names were tried, e.g. java_shutter_file or rhinofile. Furthermore different notations of the paths were tried out, like vco/usr/lib/vco/app-server/conf/rhinofile, /vco/usr/lib/vco/app-server/conf/rhinofile, data/vco/usr/lib/vco/app-server/conf/rhinofile, /data/vco/usr/lib/vco/app-server/conf/rhinofile etc. This was tested with version 8.5.1 and 8.9.0.
3. After the restart of the Orchestration service and an new login into the vRA the error message 'TypeError: Cannot call property getProperty in object [JavaPackage java.lang.System], it is not a function, it is "object"' occures.

This is exactly the same error message as in a simulation where the ClassShutter is set on the same way.
context.setClassShutter(new ClassShutter() {
public boolean visibleToScripts(String className) {
if (
className.startsWith("java.util")
) {
return true;
} else {
return false;
}
}
});

It looks like accessing classes, outside of java.util.*, does not work, despite the configuration.
As far as I can see uses the Orchestrator 8.5.1 the Azul JDK Zulu 11.0.12.
What is my mistake? What else do I need to do to access Java classes via JavaScript?
Thanks for hints and tips.