I don't understand why you want to interpret, the JVM is good at that. Consider using the approach of this demo which compiles and evaluates Java expressions: https://ksl.dev.java.net/source/browse/ksl/trunk/compiler/test/tools/javac/api/evalexpr/ Cheers, Peter