I sometimes find myself trying out small, standalone Java snippets, much as I do in other languages. But unlike other languages, Java doesn’t provide a built-in REPL for this. Sure, I can wrap the snippets in JUnits or small main programs, or use Eclipse scrapbook pages, but that’s the slow way to experiment. I want something lightweight and fast for this decidedly heavyweight and slow language.
In the past, I’ve used different Java shells and sites to fill this gap, but since I’m working in Groovy more lately, my new favorite is the Groovy Console. And when I need snippets integrated with my code and environment, the Groovy-Eclipse plugin provides that.