ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Beard <>
Subject using recent Rhino in ant script
Date Thu, 19 Aug 2010 19:26:36 GMT

I'm trying to use a recent version of Rhino in an ant <script> tag, but 
it seems to be using the version of Rhino that comes bundled with the 
JVM instead. I've tried adjusting the classpath to specify the Rhino 
script jar. Currently, I've tried the following:

<project default="hello" name="hello-world" basedir=".">

     <target name="hello">

         <script language="javascript">


             <pathelement location="js.jar"/>






Notice the inclusion of E4X syntax in the script, which should work only 
work in Rhino from Mozilla, and not the one bundled with the JVM.

js.jar is in the same directory as the ant script. I've also tried 
renaming it to rhino.jar, as I think I've seen documentation that 
suggested that this was necessary.

When I run it, it gives the following error:

javax.script.ScriptException: syntax error
(<Unknown source>#3)

So, it does appear as though it is still using the version of Rhino that 
comes with the JVM.

I'd appreciate any guidance anyone can offer on this. Thanks,


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message