DevOps / BeanShell Interview questions
What are BeanShell commands?
Commands are BeanShell's extension mechanism for adding scripting conveniences beyond plain Java syntax - built-in examples include print() (display a value), source() (run a script file), and frame() (quickly pop up a GUI frame around a component for testing).
Under the hood, most commands are themselves just BeanShell scripts stored as .bsh files on the classpath, in a package BeanShell knows to search - so the command mechanism is really just BeanShell's own scripting capability used to implement its own built-in conveniences.
Because commands are loaded this way, it's possible to add custom commands to a BeanShell environment simply by placing an appropriately named .bsh file on the classpath, without modifying BeanShell's own source code.
More Related questions...