To use the JavaAdapter feature or an optimization level of 0 or greater, Rhino must be running under a security manager that allows the definition of class loaders.
Windows versions of the Symantec JIT prior to 3.00.029(i) will report internal errors for some generated class files.
On the Symantec JIT and the AIX JVM, accessing a static field of a class that has not yet loaded may not give the correct value of the field. For example, accessing java.io.File.separatorChar before java.io.File has been loaded will return a value of 0. (This is a bug in the JIT; accessing the field should cause the class to be loaded.)
The AIX Java version "JDK 1.1.6 IBM build a116-19980924 (JIT enabled: jitc)" core dumps running several classes generated by Rhino. It also has errors in java.lang.Math.pow that are reflected as failures in the JavaScript Math object's pow method.
IBM Java for Linux version "JDK 1.1.8 IBM build l118-19991013 (JIT enabled: jitc)" has errors in java.lang.Math.pow that are reflected as test failures in the JavaScript Math object's pow method.
Solaris JDK 1.1.6 has errors in java.lang.Math.atan2 that are reflected
as test failures in the JavaScript Math object's atan2 method.
javaObj.fieldAndMethod = 5;You can work around this by forcing the field value to be converted to a JavaScript type when you take its value:
var field = javaObj.fieldAndMethod;
javaObj.fieldAndMethod = 7;
// now, field == 7
javaObj.fieldAndMethod = 5;
var field = javaObj.fieldAndMethod + 0; // force conversion now
javaObj.fieldAndMethod = 7;
// now, field == 5
Under the 1.1.6 JRE, evaluating (new Date(1998, 9, 25, 2)).toString() returns:
Sun Oct 25 02:00:00 GMT-0800 (PST) 1998Earlier versions may return:
Sun Oct 25 02:00:00 GMT-0700 (PDT) 1998(the JRE doesn't report the changeover until Nov. 1.)
The Microsoft SDK 3.1 for Java also exhibits this problem.