Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Script engine prior to Java SE 6?

For some reason, I have to use Java 5. I started learning programming from java se 7 so i am not familiar with the old versions.

javax.script package, which contains the ScriptEngine class and ScriptEngineManager class does not exist in Java 5. But Rhino project was created way before Java 5. So I am wondering how to use java script engine before javax.script was introduced in java 6?

(I scanned through Java se 5 API documentation. There doesn't seem to be a substitution for ScriptEngine class. And all the online searching result gives me the modern code.)

like image 359
Fermat's Little Student Avatar asked Dec 02 '25 09:12

Fermat's Little Student


2 Answers

Take a look at Apache BSF. Rhino actually appears on the list of supported languages.

like image 147
arshajii Avatar answered Dec 04 '25 00:12

arshajii


You may be able to download the source/jars for from the Rhino project and use them directly: https://developer.mozilla.org/en-US/docs/Rhino

like image 33
Keith Avatar answered Dec 04 '25 01:12

Keith



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!