BeanShell is an interpreter for Java, inspired by Tcl, similar to JACL or Jython that allows scriptable control of Java code.
The primary advantage of BeanShell for the Java programmer (presumably) is that it uses Java as the scripting language (BeanShell slightly loosens the syntax to allow things like dynamic typing). Thus one can use BeanShell to script Java components/classes without having to know another language (like Jython [L1 ], Tcl, Javascript, JRuby, Kawa scheme, etc)
The newest version supports the Java language, fully allowing one to define classes in BeanShell that can be interacted with from compiled Java code.
jmn 2004-01:
BeanShell appears to allow a separate working directory per interpreter. A bit more independence in the way interpreters deal with filesystems is something I'd love to see in Tcl. As things stand you are sometimes forced to a multi-process solution, (or else over-riding of inbuilt commands) to work around this limitation, - when a single process multi-interp solution would have been more natural and efficient.
e.g a multi-user shell server application, or even a single user shell system where you want the user to flip back and forth between contexts.
Having to save and restore the cwd can be a nuisance, especially if there are running commands (perhaps external) that expect to be 'in' a particular filesystem. (see note at end of pwd)
DKF: notes that the current directory in Java is an "interesting" concept, and that it depends on system properties in some kind of annoyingly complex way. Tcl's scheme is much simpler. :^)
davidw The author states here http://www.beanshell.org/faq.html that:
I was, on the other hand, very excited about Sun's announcement that they intended to port Tcl to Java (Jacl) and provide greater Tcl/Java integration. Tcl is cool and my desire for an embeddable / extensible scripting language for Java drove me to start this project. However I have not seen much progress on this project since John Ousterhout left Sun.