convert string to code

hi everybody if i have string of code like this "if(x == 5)y=5;"how can i convert it to real code to run in runtime ?Note: i checked Reflection API and i do not find any thing
[203 byte] By [elmoftya] at [2007-11-15]
# 1

maybe this is the wrong forum for this task,

but you may try something like:

- create a complete class, compile it and use a custom classloader to use it.

- write it in a embeddable scripting language and try to use it (search for ScriptEngine in Java 6)

- enhance your code with AspectJ or something similar

joerg04a at 2007-7-12 > top of java,Core,Core APIs...