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”);
Similar Posts:
- Treatment of MySQL database keyword as column name by mybatisplus — sqlsyntax errorexception: you have an error in your SQL syntax;
- Git commit -m ‘Add Readme’ error: pathspec ‘Readme” did not match any file(s) known to git
- [Solved] Factory method ‘jdbcDialect‘ threw exception; nested exception is org.springframework.data.jdbc.repo
- [Solved] json.decoder.JSONDecodeError: Expecting ‘,‘ delimiter: line xx column xx (char xxx)
- Solutions to the problem of too many arguments in Linux Bash
- In Oracle, an error is reported: ora-00904
- Solution to the problem of Java program “resource leak: ‘SC’ is never closed” in vscode
- JAVA Error: too many characters in character literal
- Error reporting of Python STR type dictionary conversion
- The Java – jar *. Jar prompt in CMD is unable to access jarfile *. Jar or windows can’t double-click to run jar file. What should I do