+ 2
[Closed] Nashorn
What's wrong with it? Why is it not working? https://code.sololearn.com/cr8LDDRomtvK/?ref=app Took help from https://javapapers.com/core-java/run-javascript-from-java/
5 Answers
+ 3
Nashorn was removed from Java in version 1.15.2 and no longer supported. SoloLearn is on 1.16.
+ 2
John Wells , Thanks for the answer. Do you know any alternative way to use Javascript in Java?
+ 2
No guarantees in will work in SoloLearn but other companies provide them.
https://golb.hplar.ch/2020/04/java-javascript-engine.html
+ 2
User42 check out GraalVM, it is cutting edge virtual machine, and has a great polyglot story supporting Java, JS, C++, Python and Ruby as well. Will not work on Sololearn though.
https://www.graalvm.org/javascript/
Quote from this page:
"GraalVM supports all Nashorn features, improves performance, and includes all the latest ECMAScript features"