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.
Another usage example could be -
load image1 "original.png"
img = blur(image1, 15)
img = crop(img, 50, 150)
save img "newimage.png"
So you can see from both usage examples, the ability to do dynamic inputs is the key part. The syntax isn't so important.
Can someone provide some input on how I might approach this? What might be a pro or con for one method over another?
I don't want to write my own parser for doing this. From what I understand I don't have to with some of the options out there.
I came across this great article on some scripting options out there -
Choosing A Java Scripting Language Suggestions?
Thanks,
Aaron R>