Bean Shell

This thing may be called "Instant Java".

A great scripting, testing and debugging tool. Provides a scripting language that is "almost Java", a nice GUI, a class browser, class reloading capabilities, and a partridge in a pear tree.

It can give you real productivity boost when you work in Java. Suppose that you have some new jar with the API that is unfamiliar to you. BeanShell can introduce you to this API fairly quickly. Sometimes people use JavaUnit for that purpose -- just to get aquainted with API inside which they should work. BeanShell allows you to do that with a much greater comfort. Just one feature -- adding classpath items inside a script -- helps a lot.

BeanShell can help on application design stage. You can prototype your application with BeanShell scripts quickly and then transform them to real Java classes WHEN EVERYTHING WORKS. That's a high quality of DesignPhase, of course :)

BeanShell works very close with JavaBeans "design patterns": > 42 is translated to foo.getBar() > 42 by the interpreter. Non-programmers can get their minds around the first way of writing more easily, thus BeanShell is incredibly useful for end user programming.

NetBeans provides a unified API for executing BeanShell, DynamicJava and JavaPython scripts. -- ManuelSimoni

JayEdit also provides access to BeanShell. In fact, keyboard macros automatically generate BeanShell script and there's a console plugin that features BeanShell. -- MarkCrocker

I've recently discovered this gem. I've gone from mild interest (hmm... dynamicly typed java?), to moderate disbelief (yay... no more casting required), to severe joy ( mean I needn't stub out methods? I don't need to completely implement the interface I'm casting to!?). I must say, I'm really hoping that this can take off some of the sharp edges and corners of java that I've been cutting myself on as of late.

Dynamic typing, transparent support for primitive types, appropriate casting to interfaces (including the all important DoesNotUnderstand, called Invoke)... this should be interesting :)

I have to admit one thing, however: I hate the name :)

-- WilliamUnderwood
one of the most useful features of this language is that it lessens the difference between classes and functions. a little example:
 foo(x,y) {
     bar(z) {
       print("x=" + x + ", y=" + y + ", z=" + z);
     return this;
 x = foo("hello", 5);;
will print
 x=hello, y=5, z=3

See DynamicJava, DrJava (from Rice University, another environment that is almost Java), OtherLanguagesForTheJavaVm

View edit of July 4, 2009 or FindPage with title or text search