Easier Scripting for Java With The Apache Bean Scripting Framework (BSF)
BSF will not only enable writing code in a scripting language and yet being able to access Java libraries but it also provides an API that permits calling scripting language engines from within Java.
BSF has announced the release of version 2.4 only a few days back.
To use BSF download the jar file and include it in your classpath, along with any required classes or jar files for the desired languages.
BSF supports the following scripting languages:
- Javascript (using Rhino ECMAScript, from the Mozilla project)
- NetRexx (an extension of the IBM REXX scripting language in Java)
- Python (using Jython)
- Tcl (using Jacl)
- XSLT Stylesheets (as a component of Apache XML project’s Xalan and Xerces)
In addition, the following languages are supported with their own BSF engines:
- Java (using BeanShell, from the BeanShell project)
- Groovy
- JLog (PROLOG implemented in Java)
- JRuby
- JudoScript
- ObjectScript
- ooRexx (Open Object Rexx), using BSF4Rexx.
Download Bean Scripting Framework
BSF Manual
Although not directly related to BSF, here’s some more news from Apache Jakarta – The project has released new versions of Commons Configuration and Commons Lang. Commons Configuration provides a generic configuration interface which enables an application to read configuration data from a variety of sources. Commons Lang provides helper utilities for Java. Version 2.2 has a new text package.
Related:
Groovy bridges the scripting and the enterprise Java worlds
Scripting Jython and Groovy using Coyote with NetBeans
Simplifying Java with Jakarta Commons Lang
Jakarta Commons Book gets a 5 out of 5
no comments