Connection Technologies Products
-----
 /
Connection Technologies
*Prebuilt Connections
*MathLink
*Java Toolkit: J/Link
*Download
*J/Link License Agreement
*Examples
*Installation Instructions
<Q&A
*Documentation
*.NET/Link
*Web Services Package
*Wolfram Workbench
*Download Developer Kit
*MathLink License Agreement
*References and Support
*GUIKit
*DatabaseLink
*Ask about this page
*Print this page
*Email this page
*Give us feedback
*
Sign up for our newsletter:

Q&A

General Questions Software and Installation Questions



General Questions

Q: What is J/Link?
  J/Link is a toolkit that integrates Mathematica and Java. It lets you call Java from Mathematica in a completely transparent way, and it lets you use and control the Mathematica kernel from a Java program. J/Link is also the recommended and supported way to make Mathematica-based functionality available over the web. For Mathematica users, J/Link makes the whole universe of existing and future Java classes an automatic extension to the Mathematica environment. For Java programmers, J/Link turns Mathematica into a scripting shell that lets you experiment with, build, and test Java classes a line at a time. It also makes Java the ideal language for writing programs that use the computational services of Mathematica.
   
Q: How does it work?
  The underlying glue that makes J/Link work is MathLink, Wolfram Research's protocol for sending data and commands back and forth between Mathematica and other programs. At its core, J/Link is a MathLink developer kit for Java, although it goes far beyond this. In fact, J/Link's best feature is that for a large class of uses, it hides MathLink completely, so users and programmers do not need to know anything about it. This class corresponds to the so-called "installable" or "template" MathLink programs, which plug into Mathematica and extend its functionality. For all types of MathLink programs, J/Link provides a higher-level layer of functionality than the traditional C-MathLink programming interface does. This makes Java the easiest and most convenient language for writing programs that interact with Mathematica.
   
Q: In simple terms, what can J/Link do?
 
  1. J/Link allows you to use Mathematica remotely to do the following:
    • Call Java methods from Mathematica
    • Write Java programs that use the services of Mathematica
    • Write applets that use Mathematica kernels on the client or server
  2. J/Link allows you to use Java functions inside your Mathematica program to do the following:
    • Create alternative front ends for Mathematica
    • Create dialog boxes and other pop-up user-interface elements for Mathematica programs
    • Create and manipulate ActiveX and other COM objects from Mathematica (Microsoft Windows only
   
Q: How much does J/Link cost?
  J/Link is free!
   
Q: Can J/Link work across the World Wide Web?
  Yes; since Java was implemented to work across the World Wide Web, J/Link can as well.
   

Software and Installation Questions

Q: Do I need any additional software?
  While it is possible to hook up Mathematica to the web directly using MathLink and C code, there are a number of tools that make this process much easier. J/Link is a free Wolfram Research API that allows you to call Mathematica from Java, load Java classes into Mathematica, or create and run Java code from Mathematica code. There are also tools to connect Mathematica and Perl, Python, or TCL/TK. We also provide tools that help you to set up your Mathematica-enabled web site and to make sure that you do not violate the license agreement you signed.
   
Q: Do I need a compiler to run a J/Link program?
  No; however, you must have a Java runtime that is Version 1.1 or later. On the Macintosh, you must have the Macintosh Runtime for Java (MRJ) 2.1 or later.
   
Q: Do I need anything else to run my J/Link program?
  Yes; J/Link requires Mathematica 4.0 or later and is compatible with all platforms on which Mathematica and Java are available. Virtually all features of J/Link will work fine in Mathematica 3.0, but this is not an officially supported configuration. You do not need to have Mathematica installed on your machine to use J/Link (you can use a remote Mathematica kernel), but you do need to have the MathLink files installed. The MathLink files are part of the Mathematica distribution, so if you are running Mathematica on a machine, then MathLink is installed there. Contact Wolfram Research for specific information about obtaining the MathLink files if you do not have them for the platform on which you intend to run J/Link programs. Microsoft Windows 95/98/NT users require the MathLink files that are included with Mathematica 4 or later. Users with Mathematica 3.0 can obtain these files here.
   
Q: Do I need a special compiler to compile my Java programs that use J/Link?
  No; however, to write your own Java programs that use J/Link, you will need a Java compiler such as the one in Sun Microsystems' Java Development Kit (JDK), available free for Solaris and Windows. Commercial and freeware Java compilers are available from many vendors. To use the "installable Java" component of J/Link, where you call existing Java classes from Mathematica, you need only a Java runtime, not the compiler and development kit.
   
Any questions about topics on this page? Click here to get an individual response.


 © 2009 Wolfram Research, Inc.  Terms of Use  Privacy Policy