If your use case is things like "5*(2+1)" then the Jasmine library by @quark – that @GoToLoop linked to above – is definitely the way to go. It is expressive and blazing-fast.

This sketch shows how to use Jasmine to calculate 5*(2+1) and also how you can evaluate the expression a*(b+c) for different values.

import org.quark.jasmine.*;
String strExpr = "5*(2+1)";
Expression expr = Compile.expression(strExpr, false);
int v = expr.eval().answer().toInteger();
println(v);
// Can also create a general solution to a * ( b + c)
strExpr ="a * (b + c)";
expr = Compile.expression(strExpr, false);
v = expr.eval(5, 2, 1).answer().toInteger();
println(v);
// Now solve 16 * (10 - 5)
v = expr.eval(16, 10, -5).answer().toInteger();
println(v);