You can use MathLink to communicate with many types of programs,including with Mathematica itself. There are versions of the MathLinklibrary for a variety of common programming languages. The J/Linksystem provides a standard way to integrate Mathematica with Java,based on MathLink. With J/Link you can take any Java class, andimmediately make its methods accessible as functions in Mathematica.