On Aug 3, 1:32 am, Daniel Friesen <[email protected]> wrote: > > > There's something wrong in your process. I've just updated from CVS, > > executed your commands and worked flawlessly. There's one thing that > > bothers me. Why the first line outputted by Rhino is: "Rhino 1.7 > > release 1 2008 11 26"? It should have outputted the date when you > > built the sources, which I assume was not November 26th, 2008. > > cvs -d :pserver:[email protected]:/cvsroot update -d -R > ./mozilla/js/rhino/ > > This is the command I'm using for updating from cvs. > > I set my JAVA_HOME with > export JAVA_HOME=/usr/lib/jvm/java-6-sun > > Run: > ant jar > > And to start up the jar built: > java -jar build/rhino1_7R3pre/js.jar -version 170 > > It feels a little strange myself as well. I see JSON and JS 1.8 code > inside the source code I have, but -version 180 gives me an error.
I'm pretty sure you're being bitten by the OpenJDK Rhino-on-the- bootclasspath bug. https://bugs.launchpad.net/ubuntu/+source/openjdk-6/+bug/255149 In a nutshell, OpenJDK uses the unmodified Rhino package to implement the JS javax.script.ScriptEngine in a way that makes it impossible to use your own version of Rhino. You have the following options to work around this bug: 1. Make the Sun Java packages your default using "sudo update-java- alternatives -s java-6-sun". Setting the JAVA_HOME environment variable won't do the trick! 2. Start java with the -Xbootclasspath/p:"/path/to/js.jar" to put your own Rhino on the boot classpath. 3. Remove the symlink named rhino.jar in /usr/lib/jvm/java-6-openjdk/ jre/lib. (This will probably break the javax.script Rhino engine.) This is really an annoying issue. One way to fix it would be to bundle the ScriptingEngine implementation with rhino as I proposed in bug 379385 and then get OpenJDK to use that. https://bugzilla.mozilla.org/show_bug.cgi?id=379385 Hannes > -- > ~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name] _______________________________________________ dev-tech-js-engine-rhino mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino
