The MathWizards JavaTM package is a set of Java classes that provide matlab-compatible interpretation capabilities to Java applets and applications running on Windows NT/95. This document describes the contents of the package and provides instructions for running the included demonstrations.
NOTE: The MathWizards package is compatible with Java 1.1. Using it with Java 1.0 will not work!
The MathXplorer/J, MathViews interpreter class does not currently abide by the security limitations imposed by applet-running environments. In fact, the MathViews interpreter has full access to the host on which it runs. It can invoke external commands, traverse the host's file system, even create and delete commands, even if the applet which includes it does not have those permissions. You should bear this openness in mind when writing or running applets/applications.
appletviewer which runs applets,
and java and jre, which run stand-alone Java
applications. mathsrv1.dll and mwjni11.dll
in appropriate system directories where they will be seen by Java.
If you've moved these DLL's to other directories, make sure you add
those directories to the PATH environment variable.
Otherwise, "UnsatisfiedLinkError" will
surely appear.
MVPATH environment variable. Like
the PATH and CLASSPATH variables, this
variable consists of list of directories. The MathViews interpreter
searches these directories for scripts with an "m"
suffix. Several scripts needed by MathWizards demos are in the
mfiles subdirectory mentioned above. If you've deleted
this environment variable by accident, you can always restore it:
suppose the MathViews installation is on E:\MathViews.
Then to make the MathViews interpreter aware of both the
general-purpose mfiles and those used by the Java package demos,
invoke the following at command at the DOS prompt:
set MVPATH=E:\MathViews\mv;E:\MathViews\java\demos\mfiles
CLASSPATH
environment variable with the location of the MathWizards and graph
class files. This allows java to find and access the MathWizards and
graph packages. For example, suppose you are using JDK 1.1, and the core
Java classes (file classes.zip) are found in C:\JDK\lib.
Further suppose that the MathWizards and graph class files are installed
in E:\MathViews\Java\class. Then the CLASSPATH
can be set with the following DOS command:
set CLASSPATH=E:\MathViews\Java\class;C:\JDK\libYou can also permanently add the
CLASSPATH variable to you
environment.
Simple,
invoke the following commands at the DOS prompt:
java MathWizards.demo.Simple
DOS prompt:
cd E:\MathViews\java\demo hotjava ASimple.htmlOf course, you could use the JDK's
appletviewer instead of
hotjava. You will be able use Netscape Navigator once it
has full Java SDK 1.1 support. Simple is stand-alone application useful for debugging
your MathWizards Java package installation. You may observe the following
two errors on running Simple by invoking the command
java MathWizards.demo.Simple
at the DOS prompt:
Can't find class MathWizards.demo.Simple
The CLASSPATH environment variable does not include
the directory in which the MathWizards subdirectory resides. As
described above, you must do this first.
java.lang.UnsatisfiedLinkError: no mwjni11 in shared library path
at java.lang.Runtime.loadLibrary(Runtime.java:440)
at java.lang.System.loadLibrary(System.java:569)
at
at MathWizards.demo.MVFrame. (Simple.java:16)
at MathWizards.demo.Simple.main(Simple.java:139)
Java is unable to find the DLL mwjni11.dll. The file
must be in one of the directories which constitute the PATH
environment variables. Alternatively, it can be in the system
subdirectory, where it can be accessed without modifying PATH
(this is where the installation procedure places it). To fix this,
find the file and make PATH point to it. Instead, you
move mwjni11.dll to one of the directories that are
already in the PATH.
Once you have Simple running, type
x = rand(4)
at the prmopt, followed by enter. The prompt is the yellow
text box at the bottom of the window. Then, try invoking
x = paraboloid(10)
If you get the following error message in the top text box:
while executing 'Submatrix' paraboloid : Undefined variable or function
Then, your MVPATH environment variable either does not
exist or does not include the directory which contains the mfiles used by
the demo applets. You must define or modify it first. Remeber that you can
find out what your MVPATH is by typing
_MVPATH
at the MathViews prompt.