This is documentation for Mathematica 5.2, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

This User Guide is divided into two parts, reflecting the traditional distinction between the two ways of using Mathematica with external programs. The first use is to extend the Mathematica environment by "installing" external programs so their functionality appears to be a built-in part of Mathematica. This is similar to the "plug-in" concept supported by many popular applications and tools. The second use is to create programs that call on Mathematica as a computational engine running in the background.

Extending the Mathematica environment by loading and calling Java classes is described in Part 1. This part will appeal to the widest audience because it requires no special programming skills, meaning that you do not have to be a Java programmer to use the features it describes. If this is what you want to use J/Link for, read through Section 1.1, "J/Link Basics." You should be able to start using J/Link right after this. You should also at least take a look at Section 1.2, "Advanced Topics." You can examine that section in more depth later, as your familiarity with J/Link grows. Section 1.3 works through some complete examples of useful programs.

Part 2 of this manual describes how to write Java programs that use Mathematica for computations. This part documents J/Link as a MathLink developer's kit for Java. Some familiarity with MathLink is assumed. MathLink is documented in Section 2.12 of The Mathematica Book.

This manual uses the phrase "J/Link programming" to describe the creation of Mathematica programs that call Java, as well as Java programs that use Mathematica for computations. It should be clear from the context which of these is meant.