I am trying to create an Android application that reads a txt file written in Java syntax and compiles it using another language.
Skip java -> script, I want to know how I can embed a script interpreter or something to compile the script code.
So, the main functionality: read the script code, compile it, give the result. for example, show the Hello World screen.
I know that there is an โofficialโ sl4a application, but I just want to compile it and embed it in my application. Is it possible?
Btw is there any parser that translates Java code into Python code or another script language? If so, how should I read in java code, like a string from txt or html or?
Thank you very much.
Thanks everyone! Sorry, I donโt know how I should edit my own post, so just do it like this.
I have explained in detail why I am trying to do this in my Femi answer below so you can check it out.
In short, I just want my application to read in Java code and compile it. Since there is no java interpreter or compiler in Java, I have to use a different language. Do not know how.
Thanks!
source share