Nashorn is the beating heart for
https://github.com/lorenzoongithub/nudge4j
Around 100 stars in github so probably not worth much consideration to whoever decided to 'deprecate it'
Again, nudge4j is effectively 8 lines of Java code (just enough to kick off the nashorn engine) and the rest is JavaScript on Java.
I hope that JEP 335 won't go ahead. I vote against.