FAQs

At BSF's website

Starting with the release of BSF 2.3 the BSF's FAQ is bundled with the distribution, the most recent version can always be found at the website.

FAQ: http://commons.apache.org/bsf/faq.html

Articles and Presentations

The following sections list articles and presentations written about BSF. If you've written something that should be included, please post it to one of the mailing lists.

Articles

Using JavaScript with Ant

A tutorial about using BSF, JavaScript, and XSLT with Ant.

Author: Dylan Schiemann
URL: http://www.sitepen.com/ant/javascript.html

Script JavaBeans with the Bean Scripting Framework

Add scripts to your JavaBeans or JavaBeans to your scripts

Author: Mark Johnson
URL: http://www.javaworld.com/javaworld/jw-03-2000/jw-03-beans.html

Xalan-Java Extensions

For extensions written in languages other than Java, Xalan-Java uses the Bean Scripting Framework (BSF), an architecture for incorporating scripting into Java applications and applets.

Author: Apache XML Xalan developers
URL: http://xml.apache.org/xalan-j/extensions.html

Using JavaScript/Rhino with BSF and Apache

The Bean Scripting Framework (or BSF) was originally developed by IBM and now published as open source. It provides a framework for using a number of scripting languages with Java. Rhino is one of the supported languages.

Author: Norris Boyd
URL: http://www.mozilla.org/rhino/bsf.html

Extending Your Applications with Bean Scripting Framework

BSF brings standard support for many programming languages to the Java platform.

Author: Rick Hightower
URL: http://jdj.sys-con.com/read/36422.htm

Embed JudoScript in Java

Two ways to embed JudoScript in Java: through its support of Bean Scripting Framework and its own, simpler engine interface.

Author: James Huang
URL: http://www.judoscript.com/articles/embed.html

JRuby Documentation

Using JRuby with BSF

Author: Jan Arne Petersen
URL: http://jruby.sourceforge.net/doc-bsf.shtml

Embed ObjectScript in Java

ObjectScript can be embedded either through it's own native interface, or through BSF.

Author: Rob Clark
URL: http://objectscript.sourceforge.net/?docs/embedding.html

The Augsburg Version of BSF4Rexx

"BSF4ooRexx", the Bean Scripting Framework for Rexx, allows one to use the Rexx and Object Rexx programming languages with the open source Bean Scripting Framework (BSF) which enables Java programs to easily invoke scripts and programs written in another language than Java. This article introduces the "Augsburg version" of BSF4Rexx which incorporates numerous changes and as a main feature the ability to start Java from Rexx programs. This way all of Java can be viewed as a huge external Rexx function library from the perspective of Rexx, available on any platform Rexx is available. This paper gives a bird eyes view of BSF4Rexx concentrating on this latter ability and introducing Rexx programmers informally to Java and to the most important object-oriented terms such that the unacquainted Rexx and Object Rexx programmer becomes able to read the Java documentation and as a result apply BSF4Rexx to allow (Object) Rexx to use and drive Java.

Author: Rony G. Flatscher
URL: http://wi.wu-wien.ac.at/rgf/rexx/orx14/orx14_bsf4rexx-av.pdf

Camouflaging Java as Object REXX

The Java runtime environment (JRE) is available for practical every operating system in the world and installed on most computers. The functionality of the Java classes that build the JRE has been constantly updated to reflect the advances in the software technology thereby making bleeding edge software concepts available to Java programmers. For that reason the JRE has been an attractive target for making its functionality available to Rexx programs in the form of external Rexx functions, notably with the "BSF4ooRexx" (Bean Scripting Framework for ooRexx) (old: "BSF4Rexx" (Bean Scripting Framework for Rexx)) technology introduced at past International Rexx Symposiae. BSF4[oo]Rexx supplies a procedural interface to Java, such that Rexx programs need to simply use CALL-statements or function-calls to bridge into Java.

As Object Rexx is object-oriented an object-oriented interface to Java may be desirable as this may reduce the complexity to refer to Java. This article introduces and discusses the architecture and the implementation of Object Rexx wrapper classes that hide the procedural interfaces from Object Rexx programmers by embedding the procedural interfaces of BSF4ooRexx in Object Rexx methods, allowing e.g. the invocation of Java methods transparently via Object Rexx messages.

Among other things it will be demonstrated, how Java objects are created and sent messages to interactively via a keyboard using the Rexx "rexxtry.rex" program in a command line interface.

Author: Rony G. Flatscher
URL: http://wi.wu-wien.ac.at/rgf/rexx/orx15/2004_orx15_bsf-orx-layer.pdf

Automating OpenOffice.Org with ooRexx: Architecture, Gluing to Rexx using BSF4Rexx

The opensource Microsoft Office clone "OpenOffice" is available on multiple plat-forms, from Windows, over Linux to OS/2. It can read/write Microsoft office file-formats, such as Word, Excel or PowerPoint. Its scripting architecture is radically dif-ferent from what Microsoft has come up with and appears to be more systematic, al-though there is a rather steep learning curve to it.

The architecture of OpenOffice is exposed via the UNO (Uniform Network Objects) interface, which allows C, C++ and Python programs to exploit OpenOffice. On the Windows platform there is an ActiveX/OLE-interface supplied, such that ActiveX-script languages like VBS, JS, as well as ooRexx can be used for scripting purposes, but such programs will lock-in the company into the Windows operating system.

For the programming language Java, OpenOffice supplies a Java interface to UNO, which can also be exploited in rather innovative ways, e.g. using BSF4ooRexx (Bean Scripting Framework for ooRexx) to bridge between OpenOffice and ooRexx. Such a solution would allow for the driving/scripting of OpenOffice in a platform independent way, allowing customers to eventually break out of possibly undesired lock-ins (e.g. Windows operating system and/or ActiveX/OLE-technology).

This article gives a conceptual overview of OpenOffice UNO and explains in detail how UNO can get instantiated and interfaced with by ooRexx.

Author: Rony G. Flatscher
URL: http://wi.wu-wien.ac.at/rgf/rexx/orx16/2005_orx16_Gluing2ooRexx_OOo.pdf

Automating OpenOffice.Org with ooRexx: ooRexx, Nutshell Examples For Write and Calc

This article will give numerous little "nutshell" examples of driving OpenOffice.org via ooRexx. All the examples will run unaltered under Linux and Windows.

Author: Rony G. Flatscher
URL: http://wi.wu-wien.ac.at/rgf/rexx/orx16/2005_orx16_NutShell_OOo.pdf

Automating Subversion - An Open Object Rexx Approach

This work explores and implements scripts which allow driving the source code version control system "subversion" from ooRexx. As there are Java implementations for subversion it is possible to employ BSF4ooRexx to drive the application.

Author: Bernhard Hoisl
URL (Text):: http://wi.wu-wien.ac.at/rgf/diplomarbeiten/BakkStuff/2005/200507_Subversion_Hoisl/200507_AutomatingSubversion.pdf
URL_(Examples): http://wi.wu-wien.ac.at/rgf/diplomarbeiten/BakkStuff/2005/200507_Subversion_Hoisl/200507_examples.zip

OpenOffice.org Automation: Object Model, Scripting Languages, "Nutshell"-Examples

This work explores and demonstrates how OpenOffice.org can be automated via Object REXX by using the Java programming interfaces of OpenOffice.org and BSF4ooRexx.

This time specific ooRexx support for OpenOffice (module "UNO.CLS" by Rony G. Flatscher, derived from OOO.CLS which is based on the Java interface to the UNO component technology of OpenOffice) is used, which cuts down the necessary code dramatically and makes those programs easy ledgible and understandable (looks almost like pseudo-code).

Author: Andreas Ahammer
URL (Text):: http://wi.wu-wien.ac.at/rgf/diplomarbeiten/BakkStuff/2005/200511_OOo-Ahammer/200511_OOoAutomation.pdf
URL_(Examples): http://wi.wu-wien.ac.at/rgf/diplomarbeiten/BakkStuff/2005/200511_OOo-Ahammer/20051106_examples.zip

OpenOffice.org Automatisation with Object Rexx

This work builds on the work of Mr. Ahammer (above). It explores and demonstrates how OpenOffice.org can be automated via Object REXX by using the Java programming interfaces of OpenOffice.org and BSF4ooRexx.

This time the OpenOffice.org 2.0 scripting framework (written in Java) is used, which allows to deploy the scripts as OpenOffice.org/StarOffice macros, in a platform independent manner.

Author: Martin Burger
URL (Text): http://wi.wu-wien.ac.at/rgf/diplomarbeiten/BakkStuff/2006/200605_Burger/Bakk_Arbeit_Burger20060519.pdf
URL_(Examples): http://wi.wu-wien.ac.at/rgf/diplomarbeiten/BakkStuff/2006/200605_Burger/Bakk_Arbeit_BurgerExamples_All_20060519.zip

BSF4Rexx and OpenOffice.org Nutshell-Examples

This seminar paper introduces the easy to learn syntax of Open Object Rexx (ooRexx) and the BSF4ooRexx external Rexx function package, which allows the weakly typed language ooRexx to interface with (strictly typed) Java.

It defines and explains numerous small (nutshell) examples where the functionality of Java class libraries is used for ooRexx. In addition, the students create examples for automating/scripting the opensource office package OpenOffice.org (OOo) in an openplatform way using the OOo Java interface for that purpose.

Some of the OpenOffice related nutshell examples can be retrieved from the official OOo "Snippet" homepage.

Author: Gerhard Görlich, Åsmund Realfsen, David Spanberger
URL (Text): http://wi.wu-wien.ac.at/rgf/diplomarbeiten/Seminararbeiten/2006s_wu/20060628_BSF4RexxSnippets_version_4.pdf
URL_(Examples): http://wi.wu-wien.ac.at/rgf/diplomarbeiten/Seminararbeiten/2006s_wu/20060628_BSF4RexxSnippets_code.zip

OpenOffice.org Automatisation with Object Rexx (Calc)

This paper gives an introduction to the OpenOffice.org architecture and explains how the OpenOffice.org Calc component can be automated by using the scripting language Open Object Rexx (ooRexx). This components are open sourced and can be downloaded free of charge from the internet.

The paper is divided into a theoretical and a practical part. In the theoretical part, the main components, ooRexx, OpenOffice.org and the Bean Scripting Framework for ooRexx, will be described and it explains how the single components can work together. At the end of this part you can find an short installation guide, which shows you how to retrieve and install the single components. The practical part provides some nutshell examples, that should demonstrate how the OpenOffice.org Calc component can be automated. The concluding part should give a short summary of the paper.

Author: Michael Hinz
URL (Text): http://wi.wu-wien.ac.at/rgf/diplomarbeiten/BakkStuff/2006/200607_Hinz/20060712_OOo_calc_automation.pdf
URL_(Examples): http://wi.wu-wien.ac.at/rgf/diplomarbeiten/BakkStuff/2006/200607_Hinz/20060629_OOo_calc_examples.zip

ooRexx Snippets for OpenOffice.org Writer

This paper deals with the use of ooRexx as a scripting language for automation of OpenOffice.org Writer.

At first, there will be an introduction to the technical requirements, which include the software that has to be installed. Concerning ooRexx there is also a sub chapter about its syntax and common instructions, to give a feeling for this programming language.

The next chapter is about the architectural approach behind ooRexx and OpenOffice.org. It is described how OpenOffice.org can be accessed using ooRexx.

Chapter four is a small installation guide, which shows how to set up the different software programmes and configure them correctly. Chapter five and six show how the automation of OpenOffice.org Writer can be done. Small snippets, which are code examples, demonstrate different tasks. At last the conclusion gives a small summary and an outlook.

Author: Matthias Prem
URL (Text): http://wi.wu-wien.ac.at/rgf/diplomarbeiten/BakkStuff/2006/200607_Prem/20060724_ooRexxSnippetsOOoWriter_2.1_odt.pdf
URL_(Examples): http://wi.wu-wien.ac.at/rgf/diplomarbeiten/BakkStuff/2006/200607_Prem/ooRexxSnippetsOOoWriter_oorexx_snippets.zip

Presentations

An Introduction to BSF

This article is a short introduction into the basic concepts of BSF. To be presented at ApacheCon 2002.

Author: Victor Orlikowski
URL: http://www.dulug.duke.edu/~vjo/papers/ApacheCon_US_2002/

The Vienna Version of "BSF4Rexx"

This presentation introduces the "The Vienna Version of BSF4ooRexx", International Rexx Symposium 2006, Austin, Texas.

Author: Rony G. Flatscher
URL: http://wi.wu-wien.ac.at/rgf/rexx/orx17/2006_orx17_BSF_ViennaEd.pdf

UNO.CLS: An (Open) Object Rexx Module for Universal Network Objects

"The Vienna Version of BSF4ooRexx", allows open-platform scripting of OpenOffice.org (OOo) with the help of BSF. This is done by using the Java APIs of OOo via BSF to address the OOo "Universal Network Objects (UNO)" components, which are used to assemble OOo.

Presented at the International Rexx Symposium 2006, Austin, Texas.

Author: Rony G. Flatscher
URL: http://wi.wu-wien.ac.at/rgf/rexx/orx17/2006_orx17_UNO.pdf

BSF4Rexx: Camouflaging Java

This presentation shows what one is able to do with BSF as well, presented at ApacheCon Asia 2006, Sri Lanka.

Author: Rony G. Flatscher
URL: http://asia.apachecon.com/wp-content/presentations/ApacheConAsia2006-08-16-Flatscher-BSF4Rexx.pdf

The 2009 Edition of BSF4Rexx

With the advent of the ooRexx 4.0 in the summer of 2009 a new, fully object-oriented kernel has been made available, which allows to close an important gap between ooRexx and Java, namely synchroneous callbacks from Java into ooRexx and allowing Java methods to be implemented in Rexx.

The article "The 2009 Edition of BSF4Rexx" gives an overview of the new features made available in the BSF4ooRexx package (note the change in the name of the package from "BSF4Rexx" to "BSF4ooRexx"). Self-explanatory nutshell examples are used to stress the discussed features.

Author: Rony G. Flatscher
URL: http://wi.wu-wien.ac.at/rgf/rexx/orx17/2006_orx17_BSF_ViennaEd.pdf