Version 9 of BeanShell

Updated 2004-07-06 12:11:36 by dkf

BeanShell is an interpreter for Java similar to JACL or Jython that allows scriptable control of Java code.

BeanShell can be found at http://www.beanshell.org

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 langauge fully allowing one to define classes in BeanShell that can be interacted with from compiled Java code.

The author of BeanShell is explicit that Tcl was the inspiration for BeanShell


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. :^)


Other than the explicit inspiration, there appears to be no other cross over to Tcl.