Code for the J/Link GraphicsApp program presented in section 2.11.3 of the J/Link User Guide.
To compile or run this program, you need to make sure that JLink.jar is in the class path. You can do this by setting the CLASSPATH environment variable or by specifying the path to JLink.jar using the -classpath option on the command line. The examples below use the -classpath option. Consult your Java documentation or the J/Link User Guide for more information.
To run this program, go to a shell or DOS window and change to the directory in which GraphicsApp.class resides. Then use a line like:
(Unix)
(Mac OS X from a terminal window)
(Windows)
java -classpath "GraphicsApp.jar;\path\to\JLink.jar" GraphicsApp "c:/program files/wolfram research/mathematica/6.0/mathkernel.exe"
java -classpath GraphicsApp.jar:/path/to/JLink.jar GraphicsApp 'math -mathlink'
java -classpath GraphicsApp.jar:/path/to/JLink.jar GraphicsApp '"/Applications/Mathematica 6.0.app/Contents/MacOS/MathKernel" -mathlink'
If you wish to compile this program, use a line like this:
(Unix, or Mac OS X from a terminal window)
(Windows)
javac -classpath ".;\path\to\JLink.jar" GraphicsApp.java
javac -classpath .:/path/to/JLink.jar GraphicsApp.java