Mathematica and Java

Todd Gayley

This session will demonstrate a complete developer's kit for integrating Java and Mathematica using MathLink. The tools, classes, and libraries in this kit go far beyond simply allowing MathLink calls to be made from Java. You can use Java to build portable user interfaces for Mathematica programs, extend the kernel's functionality with installable functions, or write browser-based Java applets that use local kernels or share a kernel on the server. The principal feature of this package is that it allows any Java class to be loaded and called directly from Mathematica as if its methods were built into the kernel. You might recognize this as similar to the existing facility for "installing" C functions into Mathematica through MathLink. The difference with Java is that no programming whatsoever is required. Existing Java classes work unmodified---you don't need to know anything about MathLink or write a single line of Java. In effect, all of Java becomes an immediate and transparent extension to the Mathematica kernel.

Demonstrations will include Mathematica programs that use Java to perform numerical computations nearly as fast as C, read files directly off the internet, display graphical interface elements like progress bars and dialog boxes, view and rotate 3D graphics, and extract pixel data from JPEG and GIF files. This session will be valuable to anyone with an interest in Java, MathLink, or extending the kernel's capabilities. It will be especially interesting to anyone who has ever written a MathLink program using C. Come and see why Java is now the premier language for interacting with Mathematica.