Question

I am trying to compile commit 9c8bad6ec6d51a0abfb9f6e840e2dbec3e2fbcee of the Mozilla Rhino project to make some tests on it.

I cloned the repository to my server, and checked out the hash.

I then proceeded into compiling using ant, which returned errors on lines 128, 57 and 53 of build.xml.

I'm not 100% sure of what line 127 does:

<!--<antcall target="jar-src"/>-->

So I commented it out for the time being.

For lines 53 and 57:

<target name="compile-src" depends="prepare">
    <ant dir="/home/dario/testEnv/181834/prefix/rhino"/> <- line 53
    </target>

  <target name="compile-toolsrc" depends="prepare">
    <ant dir="/home/dario/testEnv/181834/prefix/rhino"/> <- line 57
  </target>

They seemed to be setting the path for compiling the path. They did so dynamically originally, with some variable, but as that didn't work I changed it and wrote the actual path.

Not when I compile it doesn't throw any errors, but it does not generate the compiled classes.

Any ideas?

Was it helpful?

Solution

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?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top