Hi,

mozilla_compat.js provides only few things for transition -- not every Rhino shell extension is supported by that. Only a subset of "non-shell" rhino extensions are supported. JavaAdapter in mozilla_compat.js is a cover over nashorn's own Java.extend. Java.extend, Java.type - are stricter in that errors/exceptions are preferred compared to silently returning false/providing empty method etc.

Thanks
-Sundar

On Monday 12 May 2014 09:57 PM, David P. Caldwell wrote:
I don't know how much compatibility is the goal, and I may be doing
something wrong, but it looks like (running JDK 1.8.0_05) there are
three incompatibilities between the Rhino shell and the
mozilla_compat.js implementation provided with Nashorn.

There may be reasons for these incompatibilities. But just in case
there are not,

1. readFile appears to be absent,
2. readUrl appears to be absent,
3. The JavaAdapter implementation no longer appears to silently
provide delegate methods that return null; instead the default
implementation throws UnsupportedOperationException.

Obviously I know how to work around these differences, but they cause
some software to need modification to run under Nashorn even with the
compatibility layer.

Thoughts?

-- David P. Caldwell
http://www.davidpcaldwell.com/

Reply via email to