3 Replies Latest reply on Jul 15, 2008 3:58 PM by 807589

    executing "if" conditions from a string

      I am making a webapp that reads if-statements from a local text file (MUMPS file actually). I will probably have those if statements parsed to a string, but is there any way to perhaps turn them into java code and execute them? I guess I can use string utils to make them look like java code (i.e. insert variable values), but how to I execute an 'if' condition that's in a string? The local file will change all the time, so hard-coding it is no option.

      I can turn the if statements into something like this "if (1=3 && 5=2) || (!"smstring".equals("otstring"))"

      Any help or direction would be appreciated.