BeanShell is a Java source interpreter with object scripting language features. BeanShell dynamically executes standard Java syntax and extends it with common scripting conveniences such as loose types, commands, and method closures like those in Perl and JavaScript.
Installation: place bsh-xx.jar into $JAVA_HOME/jre/lib/ext folder.
Start interpreter: java bsh.Interpreter
And experiment:
bsh % n = 55 / 6;
bsh % print(n);
9
bsh % r = 55 % 6;
bsh % print(r);
1
bsh % exit();
Thursday, July 24, 2008
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment