문제

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.)

도움이 되었습니까?

해결책 2

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

다른 팁

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top