问题
Is there any way that I can execute arbitrary Java code from a String like Sql.exect(String). Is there something like Java.exect(String). Can anyone point me to a command or simple tutorial?
回答1:
You can use Janino, take a look at here;
http://docs.codehaus.org/display/JANINO/Home
回答2:
I'm not sure if I understood you correctly, but maybe try to dig about this Java 6 Compiler API
来源:https://stackoverflow.com/questions/24654188/compile-and-execute-arbitrary-java-string-in-android