It's like Car and Carpet. But it's also the kind of car that you can build out of carpets.
...or the carpet that you can build out of cars, considering the Ringojs.
Java 6.0 comes with JSR 223 ("scripting for the Java platform"). It's a framework for hosting scripting engines. 6.0+ is shipped with a JavaScript engine based on Mozilla's Rhino.