I want user to be able to input a snippet of code with a class or function implemented in Java and the program should run this code, without referring to external tools like javac
or saving class files to fisk.
In Clojure it is clear, as there is read
and eval
. Can it be done for a plain Java code, possibly with some third party jar?
The code is expected to be some variables, some loops, some mathematical functions and maybe some calls to the framework that is running it.