Can I instantiate beanshell class sourced from another Beanshell script?
问题 I would like to run class imported from different beanshell file. But I've no idea how instantiate class from main beanshell file. Is this possible? Class which I import: class HelloW { public void run(){ print("Hello World"); } } Main beanshell file which should run and instantiate class: Interpreter i = new Interpreter(); i.source("HelloW.bsh"); 回答1: The BeanShell documentation is pretty good in this area, so you should read through that first. In your case there are few issues. That said,