Java Scripting API ( javax.scripting ) was introduced in Java 6, so it will not be available in Java 1.4 or 5. By default, Java SE 6 comes with a stripped-down version of Mozilla Rhino that interfaces via javax.scripting .
However, Mozilla Rhino itself does not require Java 6. On the requirements page:
Recent versions of Rhino have only been tested with JDK 1.4 and higher. Older versions support JDK as early as 1.1.
Therefore, to use Rhino, it seems that Java 1.4 is really enough.
As for resources, the documentation for Rhino has a lot of information. In particular, the Embedding Rhino section can be useful to see how scripts work.
Of course, the absence of the javax.scripting package means that pairing with Rhino itself will require the use of the Rhino API and not the Java 6 scripting API, but I would suggest that the functionality would be pretty similar. The only drawback that I see is that if in the future Java 6 will be supported on the target platform and / or using a different language, it may be necessary to rewrite the use of the Java Scripting API and not directly support Rhino.
source share