Compile and execute arbitrary Java string in Android

。_饼干妹妹 提交于 2019-12-25 02:29:48

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!