I want to have a shell/console in an application. The idea is to make a very simple image application that just applies a few filters to an image. So I would have an image viewing area and an entry area for the shell commands.
In the shell/console area I'd enter commands which would execute methods on java classes. A psuedo syntax might be -
image = new Image("original.png"); Blur.blur(image, 10) Crop.crop(image, 50, 150) save(image)
The idea in the above is that Blur.blur is a static method on a class. Thats a bit of design ignorance, since I don't know enough about scripting with java at all.
My first thought is to simply embed some interpreter into a small java application. Something like this. I'm not sure if Groovy supports something similar or not. I've got a question into the mailing list and I'll let you know as soon as I hear something back.
I'm interested to see what others have to say about this as well.