Jump to content

Bean Scripting Framework

From Alfawiki
Bean Scripting Framework (BSF)
Company typeSoftware framework
IndustrySoftware development
FounderIBM
ProductsScripting integration for Java applications
ParentApache Software Foundation
Websitecommons.apache.org/proper/commons-bsf/

The Bean Scripting Framework (BSF) facilitates the incorporation of scripting capabilities into Java programs. It provides Java classes that enable interaction with multiple scripting languages and allow access to Java objects and methods. Languages supported by BSF include Python, Jython, ooRexx, Tcl, alongside JRuby and Apache Groovy through their specific libraries.

Initially created by IBM, BSF was contributed to the Apache Software Foundation and is currently maintained as part of the Apache Jakarta Project. It is included within the Apache Commons suite, making it a significant resource for enterprise Java applications that demand flexible scripting integration.

BSF serves as an alternative to the JSR223 ScriptEngine introduced with Java SE 6. Although Java SE 6 incorporates a JavaScript engine based on Rhino, JSR223 extends support to various scripting languages including BeanShell, Jython, JRuby, and Groovy. Both frameworks enable embedding scripts within Java code; however, BSF continues to be relevant for projects that benefit from its extensive scripting language compatibility.

See also

  • JRuby - Ruby interpreter implemented in Java
  • Jython - Python implementation for Java
  • BeanShell - Interpreter for Java source code
  • JSR223 - Scripting API designed for the Java platform