Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Convert strings to executable java code

807569Sep 29 2006 — edited Sep 29 2006
Hey,

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!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 27 2006
Added on Sep 29 2006
2 comments
580 views