Announcement - BeanShell 2.0b1 ------------------------------ After several months of intense work I am pleased to announce the first beta release of BeanShell 2.0. With version 2.0 BeanShell becomes a fully Java compatible scripting language. BeanShell is now capable of interpreting ordinary Java source and loading .java source files from the class path. Although this code is still in beta I have been able to execute almost all of the 165 example programs from my book (Learning Java, O'Reilly & Associates) without modification as well as BeanShell's own ClassBrowser.java file. The additional code to make this possible adds only about 30K to the size of the package and the core minimal language distribution without class support remains less than 150K. BeanShell scripted classes are fully typed and appear to outside Java code and via reflective inspection as ordinary classes. However their implementation is fully dynamic and they may include arbitrary BeanShell scripts in their bodies, methods, and constructors. Users may now freely mix loose, unstructured BeanShell scripts, method closures, and full scripted classes. BeanShell scripted classes are "bound" in the script namespace in which they are declared and so can freely refer to other scripted items such as scripted methods, commands, and "global" variables of the script. e.g. // MyScript.bsh count = 5; class HelloWorld extends Thread { public void run() { for(i=0; i However these persisted class files will not yet function outside of the classloader in which they were created (the script body is not currently persisted with the class). The ASM bytecode library ------------------------ To generate the necessary bytecode for BeanShell's dynamic classes at runtime we have incorporated with permission a subset of the ASM bytecode library from Objectweb (http://asm.objectweb.org). ASM is a remarkably efficient, fast, and easy to use bytecode generator that weighs in at only 22K. (The subset we use is only about 17K.) If you are using BCEL or SERP please check out ASM as a light weight alternative. Roadmap ------- Since the new code is fairly stable I would like to work towards finalizing version 2.0.0 as soon as possible rather than pushing version 1.3.0 as widely as planned. Your feedback and comments will help this greatly. Thanks, Pat Niemeyer