Java Compiler API on IBM’s developerWorks
David Biesack of SAS Institute, Inc. wrote
Create dynamic applications with javax.tools.It walks you through an example that uses javac to compile user provided expressions and then plot them as a function. This is similar to my JavaOne demo evalexpr, but sleeker.