Category: 

What is BeanShell?

Article Details
  • Written By: Phil Bagda
  • Edited By: A. Joseph
  • Last Modified Date: 18 February 2017
  • Copyright Protected:
    2003-2017
    Conjecture Corporation
  • Print this Article
Free Widgets for your Site/Blog
A London-based company plans to begin taking tourists on deep-sea dives to the Titanic shipwreck in 2018.  more...

March 27 ,  1973 :  Marlon Brando refused the Best Actor Oscar.  more...

BeanShell is a free Java interpreter that was invented by Pat Niemeyer. It runs on the Java Runtime Environment (JRE) and uses standard Java syntax as well as loose types, command and methox closures. BeanShell adds script-like functionalities to the Java language. Like Javascript, it is an object-based scripting language. It was accepted as a Java specification request (JSR), which is the first step for a full integration in the Java programming language.

As a Java interpreter, BeanShell can be used to interpret regular Java syntax, but it also can interpret its own syntax, which can be used to scale Java from a static to a dynamic programming language. BeanShell has been unofficially named Little Java by programmers because it closely resembles the syntax of the Java programming language in many respects. It does, however, add the support of many new features, such as loosely typed variables, in which the variable does not have to be declared first. BeanShell also supports scripted objects as simple method closures and Abstract Windows Toolkit/Swing events handlers.

BeanShell has a website from which it can be downloaded. The website can be located by typing "BeanShell" into any Internet search engine. On this website, users will find many options and can download the BSH package, which includes the core interpreter, the shell commands and the utilities.

Ad

Users whose version of Java does not include Swing must add the swingall Java archive (JAR) file to the classpath. Some of the utilities use Swing. After Swing has been set up in the classpath, BeanShell will then work in a console interactive interpreter or graphical interactive interpreter.

BeanShell is an open-source project. It is small and embeddable. BeanShell has been integrated in many applications, including testing, configuration, embedded systems, rules engines, user scripting extension, rapid prototyping, dynamic deployment and even Java education.

Ad

You might also Like

Recommended

Discuss this Article

Post your comments

Post Anonymously

Login

username
password
forgot password?

Register

username
password
confirm
email