Convert strings to executable java code
807569Sep 29 2006 — edited Sep 29 2006Hey,
I'm not sure how easy or hard this is to accomplish, but I am looking for a way to take a string from a JTextField and use it as a control structure for an IF block.
For example, the user inputs 'keyword=="test" || keyword=="test2"' I want to use it in an if block to control it.
Is there a way to do this? I realize the java file is already compiled in a class, so the string would probably be incapable of doing such a thing.
Any thoughts would be appreciated!