This discussion is archived
0 Replies Latest reply: Dec 6, 2010 1:39 AM by 809444 RSS

Is there any third party jar files available for j2me math evaluation?

809444 Newbie
Currently Being Moderated
I want to evaluate the mathematical expression in j2me(CLDC1.1) application...


I have JEP in java for do that...

But it doesn't support j2me.bcoz,it refers java.lang.Number and which is not in the j2me Application.Is there any tool available for to do that in j2me side?

I solved this problem in java enviornment.but couldn't make it in j2me....

This is my java solution for this problem...

JEP parser=new JEP();
parser.addComplex();
/*parser.addStandardConstants();
parser.addStandardFunctions();*/
int i=10;
parser.addVariable("target",i);
parser.addVariable("status", i);

try
{
parser.parseExpression("target-status+target*(status-2)");
System.out.println(parser.getComplexValue().doubleValue());
}
catch(Exception e)
{
e.printStackTrace();
}

In java, it working good.But in j2me environment it has following Errors.,

Error preverifying class org.nfunk.jep.function.Arg VERIFIER ERROR org/nfunk/jep/function/Arg.arg(Ljava/lang/Object;)Ljava/lang/Number;: Cannot find class java/lang/Number



Is there any tool available for to do that in j2me side? Please guide me to get this issue working good in j2me side....

Expecting your post...

Saravanan

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points