Background: due to testing needs, we intend to reference. Java and. Class files from the outside, but the error is lingering: error invoking BSH method: eval
After learning from various Baidu, baidu decided to abandon the reference first and try whether BeanShell can run normally. Fortunately, the result is satisfactory
Special attention:
1. Double quotation marks are used for setting variables. There are differences between single quotation marks and double quotation marks
2. L in println is lowercase of L, not uppercase of I
Reference. Class file:
addClassPath(“D:\\”);
Reference. Java file:
source(“D:\\test.java”);