That version of Rhino is ancient.
You could fix your problem by using JDK version 1.4 to compile. The problem is that that version of Rhino contained code that was incompatible with the JDK 1.5 enhancements (specifically, it attempts to use enum
as a variable name).
Alternatively, you could patch the build.xml to specify the source version to be 1.4 when compiling on the appropriate javac
tasks.
More realistically, do you have any option of upgrading to a reasonably recent version of Rhino?