title: Can't import static method using MVEL
body: <p>According to MVEL's documentation, it's possible to import static java methods in a script: <a href="http://mvel.codehaus.org/Programmatic+Imports+for+2.0" rel="nofollow">http://mvel.codehaus.org/Programmatic+Imports+for+2.0</a> . The following example is taken from that page, however is not working (I get an Error: unable to access property (null parent): time). What could be wrong?</p>
  
  <pre><code>import java.io.Serializable;
  import org.mvel2.MVEL;
  import org.mvel2.ParserContext;
  
  public class Test {
  
      public static void main(String[] args) {
  
          ParserContext ctx = new ParserContext();
          try {
              ctx.addImport("time", System.class.getMethod("currentTimeMillis", long.class));
          }
          catch (NoSuchMethodException e) {
              // handle exception here.
          }
  
          Serializable s = MVEL.compileExpression("time();", ctx);
          Object ans = MVEL.executeExpression(s);
          System.out.println(ans.toString());
  
      }
  
  }
  </code></pre>