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-27 9:30:32]
# 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 22:42:22 > top of Java-index,Core,Core APIs...