IBM Support

Automation scripts updates required with the JavaScript engine in JDK 1.8

Troubleshooting


Problem

In JDK 1.8, the Mozilla Rhino JavaScript (JS) engine has been replaced with the Oracle Nashorn (V8) engine. If you change to JDK 1.8, your automation scripts that worked with the Mozilla Rhino JavaScript (JS) engine may not work as expected.

Cause

Oracle Nashorn has a slightly different flavor of JS than Mozilla Rhino and therefore some of your automation scripts that worked with the Mozilla Rhino JavaScript (JS) engine may not work as expected with the Oracle Nashorn engine without updating them.


For example, the importPackage command will not work correctly. You would need to use the JavaImporter function to complete the same action in Nashorn.

Resolving The Problem

For more information about Mozilla Rhino and Oracle Nashorn that may impact your script code in JS, go to the StackOverflow forum and search for “Switching from Rhino to Nashorn”.

[{"Product":{"code":"SSLKT6","label":"Maximo Asset Management"},"Business Unit":{"code":"BU055","label":"Cognitive Applications"},"Component":"Not Applicable","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.6.0.6;7.6.0.7;7.6.0.8;7.6.0.9","Edition":"All Editions","Line of Business":{"code":"LOB02","label":"AI Applications"}}]

Document Information

Modified date:
17 June 2018

UID

swg21992706