BeanShell

BeanShell is a dynamic scripting language for the Java VM by Pat Niemeyer. It allows you to run virtually unchanged Java code through an interpreter. As with Python or Perl code is doing previously translated into an Abstract Syntax Tree (AST ). BeanShell is often used as a language for macros, for example, in the text editor jEdit.

In addition to traditional Java syntax BeanShell offers some of the typical scripting languages ​​simplifications such as dynamic typing instead of static typing, global variables and functions (restricted) reflexive access to the program itself, and the like. The syntax is, however, very similar to that of the original Java, which makes it easy for Java programmers to switch between two languages ​​or translate. Since BeanShell is able to inherit from existing Java classes or implement any interfaces, it can be used well with existing frameworks and applications.

BeanShell extends the Java syntax especially in the following two points, resulting in a higher productivity is to be achieved.

  • Methods (functions ) can in turn contain methods, and raise himself as a closure on the return of this to the object.
  • Another special feature is the addition to the class-based available prototype -based object orientation.

Since version 2.0 beta 4 on 28 May 2005, no more version was released. However, the language is stable and without major errors. So far, BeanShell supports only a few of the syntactic changes in Java 1.5.

A spin-off called BeanShell2 was in May 2007 on Google Code. The project has published a number of fixes and improvements to BeanShell.

Similar approaches such as BeanShell follow the scripting languages ​​Groovy, Jacl Tcl, Rhino for JavaScript, Jython for Python and JRuby for Ruby.

110648
de