Believe it or not, with JDK1.6, you can use the built-in Javascript engine. Customise to suit your needs.
Make sure you have these imports...
import javax.script.ScriptEngineManager;
import javax.script.ScriptEngine;
Code:
ScriptEngineManager mgr = new ScriptEngineManager();
ScriptEngine engine = mgr.getEngineByName("JavaScript");
String infix = "3+2*(4+5)";
System.out.println(engine.eval(infix));