Editor's Note: This article was originally published on Feb 23, 2007. It was updated on November 2, 2007.
Last time, I introduced a three-part series that explores new Java Standard Edition 6 features not covered in my Start Saddling Up for Mustang article for JavaWorld, and my Mustang (Java SE 6) Gallops into Town InformIT article. Part 1 explored enhancements to the Collections API.
Here in Part 2 you'll take a tour of Mustang's new Scripting API, which lets you create programs that are part Java and part scripting language. This hybrid "Java/scripting language" approach to developing software benefits from Java's wealth of APIs and its other advantages, and from scripting language advantages such as support for dynamic typing.
Tour the Scripting API
JSR 223: Scripting for the Java Platform is the Java Specification Request (JSR) under which the Scripting API was created. This JSR's goal is to "describe mechanisms allowing scripting language programs to access information developed in the Java Platform and allowing scripting language pages to be used in Java Server-side Applications."
Although early versions of JSR 223 introduced the Web Scripting Framework (which was assigned to package javax.scripting.http) for generating Web content in servlet containers, this framework became optional as the specification evolved. Because the Web Scripting Framework is not included in Mustang, it is not discussed in this article.
The Scripting API is associated with package javax.script. This package identifies six classes and six interfaces. You will be introduced to each class and interface as you read this article.