Reference articles on history, science, culture and more
Encyclopedia

BeanShell

Java-like scripting language

BeanShell is a small, free, embeddable Java source interpreter with object-oriented scripting language features, written in Java. It runs on the Java virtual machine (JVM), also called the Java Runtime Environment (JRE), dynamically executes standard Java syntax and extends it with common scripting conveniences such as loose types, commands, and method closures, like those in Perl and JavaScript. It is free and open-source software released with an Apache License 2.0 since BeanShell 2.0b5.

01Features

While BeanShell allows defining functions that can be called from within a script, its underpinning philosophy has been to not pollute its syntax with too many extensions and syntactic sugar, thereby ensuring that code written for a Java compiler can usually be executed interpretively by BeanShell with no changes and, almost just as much, vice versa. This makes BeanShell a popular testing and debugging tool for the Java virtual machine (JVM) platform.

BeanShell supports scripted objects as simple method closures like those in Perl and JavaScript.

As BeanShell is an open source project, has been incorporated into many applications, such as Apache OpenOffice, Apache Ant, WebLogic Server application server, Apache JMeter, jEdit, ImageJ, JUMP GIS, Apache Taverna, and many others. BeanShell provides an easy to integrate application programming interface (API). It can be run in command-line interface mode or within its own graphical user interface environment.

02History

The first versions of BeanShell (0.96, 1.0) were released by Patrick Niemeyer in 1999, followed by a series of versions. BeanShell 1.3.0 was released in August 2003. Version 2.0b1 was released in September 2003, culminating with version 2.0b4 in May 2005, which as of January 2015 is the newest release posted on the official webpage.

BeanShell has been included in the Linux distribution Debian since 1999.

BeanShell was undergoing standardization through the Java Community Process (JCP) under JSR 274.

Following the JCP approval of the BeanShell JSR Review Ballot in June 2005, no visible activity was taking place around BeanShell. The JSR 274 status is "Dormant".

Since Java 9, Java instead includes JShell, a different read-eval-print loop (REPL) shell based on Java syntax, indicating that BeanShell will not be continued.

A fork of BeanShell, BeanShell2, was created in May 2007 on the now-defunct Google Code Web site. The beanshell2 project has made a number of fixes and enhancements to BeanShell and multiple releases. As of January 2020, the latest version of BeanShell2 is v2.1.9, released March 2018. This fork was merged back into the original tree in 2018, retaining all the independent changes from both, and the official project has been hosted at GitHub.

In December 2012, following a proposal to accept BeanShell as an Apache Incubator project, BeanShell was licensed to The Apache Software Foundation and migrated to the Apache Extras, changing the license to Apache License 2.0. The project was not accepted but instead projected to become part of the Apache Commons at a future time.

Due to changes in the developers' personal circumstances, the BeanShell community did not, however, complete the move to Apache, but remained at Apache Extras. The project has since released BeanShell 2.0b5, which is used by Apache OpenOffice and Apache Taverna.

A Windows automated installer, BeanShell Double-Click, was created in 2013. It includes desktop integration features.

Watch videos about BeanShellExplainers and documentaries on YouTube (opens in a new tab)

Sources and credits

This article is adapted from the Wikipedia article BeanShell, written by its contributors and licensed under CC BY-SA 4.0. Fathomly has changed the layout, removed citation markers, navigation and maintenance notices, and adjusted punctuation. This adapted version is shared under the same license. For references, see the original article.

Fathomly is not affiliated with or endorsed by the Wikimedia Foundation. Spotted a problem? Tell us.