wborn
(Wouter Born)
April 2, 2022, 10:51pm
1
This add-on allows you to use your older JavaScript (ECMAScript 5.1) rules on newer Java versions until they are migrated to JavaScript (ECMAScript 2021+).
The add-on uses a standalone Nashorn Engine which was part of Java until it was removed in Java 15.
Resources
1 Like
wborn
(Wouter Born)
December 19, 2022, 8:49pm
2
There’s a PR for adding the add-on for backwards compatibility because OH 4 will require Java 17:
main ← wborn:jsscriptingnashorn
opened 11:01AM - 19 Dec 22 UTC
This add-on allows you to use your older ECMAScript 5.1 code on newer Java versi… ons until the code is migrated to ECMAScript 2021+. It should only be installed for providing backwards compatibility. When writing new code it is preferred to do this using ECMAScript 2021+ for which support is provided by installing the [JavaScript Scripting](https://www.openhab.org/addons/automation/jsscripting/) add-on.
This add-on uses a standalone [Nashorn Engine](https://github.com/openjdk/nashorn) to run ECMAScript 5.1 code. The Nashorn Engine was pre-installed in openHAB 2 and openHAB 3 because it was part of Java. Since Java 15 the Nashorn Engine has been removed from Java.
---
This PR is based on the [JavaScript Scripting (Nashorn) Marketplace add-on](https://community.openhab.org/t/javascript-scripting-nashorn/134770?u=wborn).
---
To do:
* [x] Add more documentation
* [x] Update MIME types
* [x] Add more tests
Hi! Thanks for your continuous support! It saves my life! How is it going on for java 17 for OH4?
Can’t wait for it