-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to use GraalVM instead of Nashorn, which is deprecated in Java 11 #23
Comments
GraalVM looks pretty cool...
This could solve our module porting problem...
Edward
…------------
Edward A Lee
Professor
UC Berkeley
On Jun 17, 2019, at 7:01 PM, Christopher Brooks <notifications@github.com> wrote:
Nashorn is deprecated as of Java 11
<https://docs.oracle.com/en/java/javase/11/docs/api/jdk.scripting.nashorn/module-summary.html>
InfoWorld states: Oracle: Switch now from Nashorn JavaScript engine to
GraalVM
<https://www.infoworld.com/article/3291322/oracle-switch-now-from-nashorn-javascript-engine-to-graalvm.html>
:
"Oracle cited multiple advantages GraalVM has over Nashorn:"
- "A more complete implementation of JavaScript standards, with support
for the ECMAScript 2016 and ECMAScript 2017 editions and some support for
ECMAScript 2018."
- "Full support for the Node.js server-side JavaScript platform, which
is compatibie with almost all Node.js modules."
- "The ability to execute additional languages including Python, R, and
Ruby."
- "Better performance than existing JVM-based engines and ability to use
the GraalVM compiler’s advanced optimizations."
"To help developers migrate from Nashorn to GraalVM, Oracle Labs has added
a compatibility flag (—nashorn-compat) that removes the need for tedious
rewrites to move a Nashorn application to GraalVM"
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#23?email_source=notifications&email_token=ACA6ONWWWF5MFXRM4UZDKYTP3AJVPA5CNFSM4HY25H52YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G2ADH4Q>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACA6ONRTIOMORNKO3QIL75TP3AJVPANCNFSM4HY25H5Q>
.
|
Nashorn has been released as a standalone jar file. I have changes in my tree that support the standalone Nashorn and the few models I checked seem to work OK. The reason to go with the Nashorn standalone jar is because the standalone jar is likely to be closest to whatever Oracle shipped built in to the JDKs before Oracle removed builtin Nashorn support. The primary change is that the imports needed to change in a few files. The issue is that the standalone Nashorn jar is not supported in JDK 8-10. Currently, in theory, Ptolemy II builds and runs with JDK 8. When I try to compile a small test program under JDK 8 with the standalone Nashorn, I get:
https://github.com/szegedi/nashorn/wiki/Using-Nashorn-with-different-Java-versions indicates that the standalone Nashorn jar works with JDK 11 and later. We are using JDK 11 in the Travis build. So, I see the following options:
|
I checked in changes for #2 above, where CapeCode no longer works with JDK8-10. I'm working on getting another allotment of Travis credits so that the build will complete. I checked that Eclipse and Maven work. It will be necessary to rerun configure to get the updated paths. This issue can remain open because the issue is about supporting GraalVM. |
Nashorn is deprecated as of Java 11
InfoWorld states: Oracle: Switch now from Nashorn JavaScript engine to GraalVM:
"Oracle cited multiple advantages GraalVM has over Nashorn:"
"To help developers migrate from Nashorn to GraalVM, Oracle Labs has added a compatibility flag (—nashorn-compat) that removes the need for tedious rewrites to move a Nashorn application to GraalVM"
The text was updated successfully, but these errors were encountered: