Chapter 9. Scripting API

Back in Chapter 6, “Bean Scripting Framework,” I described the BSF library and explained the need for a general scripting framework like it. Although the BSF is a solid and stable project that serves its purpose well, the Java community needs a solution that better suits modern scripting languages and integrates more easily with native interpreters. In this chapter, I describe the Scripting API, a specification that arose from the Java Community Process (JCP) to create a standard Java scripting framework for the Java platform.

Here, we explore the motivation behind this API and its abstractions. We also walk through numerous examples that show us how to use these abstractions to solve everyday programming problems.

Get Scripting in Java™: Languages, Frameworks, and Patterns now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.