Rhino is an open-source implementation of JavaScript written entirely in Java. It is typically embedded into Java applications to provide scripting to end users. It is embedded in J2SE 6 as the default Java scripting engine.
How to get source and binaries.
Information on Rhino for script writers and embedders.
Some resources if you get stuck.