Friday, June 10, 2005

Beanshell annd fast prototyping

Ever had a small piece of code that you wanted to try out, but you didn't want to open an editor, create a new Class, put the code in main(), compile, run, check the results (probably with System.out.println), rinse, repeat.

Well, there's just a tool to make this thing much easier, with faster results. The tool is Beanshell, which is a lightweight scripting tool for java. In a small jar (~275KB) you have a powerful and easy to use application that lets you write java code and run it on-the-fly. It uses java as its scripting language, but eases a lot of requirements that Java imposes, mainly by avoiding Type variable declaration, and instant evaluation of code. The jar includes a Graphical Interface (Swing) and a Console Interface, so you can even use it from a remote shell. Pretty powerful for such a small jar, isn't it?

No comments:

Post a Comment