This document serves as migration guide for code previously targeted to the Rhino engine. See the JavaInterop.md for an overview of supported Java interoperability features.
Java.type(typename) instead of
You have to explicitly load the classes using
Packages global object, but loading the classes explicitly is still encouraged.
The following Java package globals are available in Nashorn compatibility mode (
Console output of Java classes and Java objects
This is an alias for
console.log in Node mode as it does not implement special treatment for such objects.
For instance, you can query the
length behaves like a data property, not like a function.
JavaImporter feature is available only in Nashorn compatibility mode (