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?
Asked
Active
Viewed 483 times
0
Ryan Ransford
- 3,224
- 28
- 35
Mohammad Rababah
- 3
- 1
2 Answers
1
You can use Janino, take a look at here;
Onur A.
- 3,007
- 3
- 22
- 37
-
is this work for android code like textviwe for example – Mohammad Rababah Jul 09 '14 at 13:10
1
I'm not sure if I understood you correctly, but maybe try to dig about this Java 6 Compiler API
Seraphis
- 1,026
- 2
- 14
- 30
-
does this work in android well for example i want String s = "int y = 3+6;" then something like Run(x) – Mohammad Rababah Jul 09 '14 at 13:01
-
Ok, It's not for Android. For that check this answer: http://stackoverflow.com/questions/17538537/compiling-string-as-code-during-runtime-on-android – Seraphis Jul 09 '14 at 13:14