me and BeanShell

Recently I got an assignment to fool around with a java library, Since I
kind in bad mood, I was thinking a way to fool around with an easy
way, not using code, compile, see because it’s just too much work. So
I remember about java scripting, there are lot of scripting in java
today, here some of it bsh, groovy, jacl, jython, rhino and others.

So I’ve to pick up one from many, I started with bsh, since the
syntax resembling java syntax with some improvement (pre java 5.0). So
I started to download it [ in ubuntu bsh already in synaptix ], and
start to playing around with it.

my first problem is how to add a jar to bsh classpath, luckily in bsh
documentation, there is a command to add jar into classpath,
here’s my snippet

BeanShell 2.0b4 - by Pat Niemeyer (pat@pat.net)
bsh % addClassPath("lib/my.jar");
addClassPath("lib/my.jar");
bsh %

after that, I smoothly played around with the API. so bsh can be a
tool for black-box testing, and I quite satisfied using it. I know
that the other scripting can be use for it, but for now I keep with
bsh for black box testing.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: