title: Import this class in MVEL and assign values to its property and access its method
body: <p>I have a math class in a package <code>mypackage</code>.
  Now I want to import this class in MVEL and assign values to its property and access its method.
  I have written the following code but its giving error as</p>
  
  <pre><code>Exception in thread "main" [Error: unknown class or illegal statement: 
                        ^
  </code></pre>
  
  <p>Code is </p>
  
  <pre><code>ParserContext context = new ParserContext();
  context.addImport("math",mypackage.MyMaths.class);//MyMaths.class is public
  context.addInput("obj", mypackage.MyMaths.class);
  
  String expression1 = "obj.a == 20";//a is public property
  
  Serializable compiled1 = MVEL.compileExpression(expression1,context);
  
  MVEL.executeExpression(compiled1);
  </code></pre>