I'm trying to use the Rhino lib to call some javascript from java code. But it seems that it is choking on a typed array. Here is my simple js file
function decrypt(version, iv, encryptedBuffer) {
var output8;
output8 = new Uint8Array(encryptedBuffer);
var outputBuffer = output8.buffer;
var output32 = new Int32Array(outputBuffer);
... more funny code
}
But when calling
jsFunction.call(rhino, scope, scope, params);
I get this
sun.org.mozilla.javascript.internal.EcmaError: ReferenceError: "Uint8Array" is not defined. (JavaScript#5680)
Is there something extra to configure to have my little js snippet run ?