DevOps / BeanShell Interview questions
How do you run a BeanShell script file?
From within another BeanShell script, the source() command runs a .bsh file, executing its contents directly in the current namespace.
Standalone, BeanShell can also be run from the command line - the classic invocation is something like java -cp bsh.jar bsh.Interpreter myscript.bsh - which starts an Interpreter and immediately sources the given file, running it as a self-contained script.
BeanShell also ships an interactive console mode, letting you type and evaluate statements line by line in a running Interpreter session, which is useful for quick experimentation without saving anything to a file first.
More Related questions...