Employing Rexx as a Scripting Language for Java
- Java, Scripting Languages, and the Bean Scripting Framework (BSF)
- Employing BSF: Three Fundamental Nutshell Examples
- Interacting with Java Objects
- Roundup and Outlook
Rexx is a scripting language that's easy to learn and easy to use. It originated in the IBM mainframe world, where it replaced an awkward and arcane scripting language. Due to its philosophy of aiming at being a "human friendly" language, the syntax and functionality of Rexx were deliberately designed to be as easy and simple as possible—yet remain powerful enough to be able to create standalone programs.
Over the course of the past 25 years, Rexx has been a very popular language at times, and it has been deployed as a scripting language for quite a few operating systems, even non-IBM systems such as the Amiga OS. The biggest exposure to the non-business world was certainly realized via OS/2.
Independent of the faith of various operating systems, today there are quite a few Rexx interpreters available for different platforms; of the free and open source versions, the most popular are Regina Rexx and Open Object Rexx (ooRexx). A part of the Rexx community is organized in the non-commercial SIG Rexx Language Association, which puts together a yearly International Rexx symposium.
Java, Scripting Languages, and the Bean Scripting Framework (BSF)
In the past, the need for scripting languages for Java applications has been neglected by many companies, most notably by Sun itself. Although Sun started a JCP process—Java specification request 223 (JSR-223)—in the summer of 2003 to define and create a standard Java interface to scripting languages, it still will be some time until it will be made widely available with the next major release of the Java language.
One major company that has embraced Java is IBM. For business application development in Java, IBM wanted to include the capability of invoking scripting languages from Java in the context of Java Server Pages (JSP) in their Java application server WebSphere. Drawing from an IBM-funded open source development project, Bean Scripting Framework (BSF), IBM incorporated that into their application server. Because BSF has been handed over to the Apache organization, everyone can use that open sourced infrastructure for free. Jakarta BSF allows deploying scripts from Java in many languages, among them JavaScript (by virtue of using Rhino, the Java implementation of JavaScript) and Netrexx, a Rexx-like language implemented in Java.
The BSF framework is aimed at making it easy for Java programmers to employ scripting languages that execute in the context of their Java applications. The package BSF4Rexx adds the scripting language ooRexx to BSF, so that Rexx and ooRexx scripts can be invoked by Java.