What is the bsh "bean shell" and what can it do for you?

The bsh "bean shell" is an example of a JavaBean, which may also be called simply a bean. A JavaBean is a Java software object that interacts with other software objects according to a strict set of guidelines, which are embodied in the JavaBeans Specification.

This particular JavaBean allows you to test snippets of Java code without the need to embed those lines of code in a full program. This makes bsh a very useful tool for testing Java syntax or semantics "on-the-fly". Anyone who has ever experienced the orginal BASIC interpreter as a programming environment will feel right at home using bsh, although this particular subset of the software development community is an ever-shrinking one.

There is a command-line version accessible on the cs machine by entering the command

bsh
at the command-line prompt, and a GUI version will fire up if you enter
bsh gui
as a command at the command-line prompt.

For additional information see here.