r/programming • • Sep 15 '20

Java 15 released!

https://jdk.java.net/15/
214 Upvotes

130 comments sorted by

View all comments

36

u/renatoathaydes Sep 15 '20

RIP Nashorn... anyone that used that for JS scripting on the JVM should now use the GraalVM's JS engine (which works on normal JVMs, not only Graal's) as a library...

The new engine is fully compatible with ECMAScript 2020 (supports even native node modules) and has a compatibility flag for Nashorn-based scripts! We might need to use that at work as we have custom scripts that probably will never be upgraded.

https://github.com/graalvm/graaljs

4

u/syjer Sep 15 '20

the only downside is it's size, 20+mb of jars vs 3~mb of nashorn is kinda hard to justify for enabling some scripting in a application :(.

1

u/renatoathaydes Sep 16 '20

You can also use Groovy, it's only a couple MB.

1

u/syjer Sep 16 '20

If by couple you mean ~8mb [0], it still quite the heavy weight ;(

[0] https://repo1.maven.org/maven2/org/codehaus/groovy/groovy/3.0.5/

1

u/renatoathaydes Sep 17 '20

Oh, it has grown a lot in the 3.x release!! It used to be around 4 or 5MB: https://repo1.maven.org/maven2/org/codehaus/groovy/groovy/2.4.19/