Example: Magic S quare
b. On UNIX, execute this command:
javac -classpath
.:
matlabroot/toolbox/javabuilder/jar/javabuilder.jar:
./distrib/magicsquare.jar getmagic.java
10 Run the application.
If you used the Deployment Tool to create it, you can use the following
commands to run the
getmagic.class file:
On Windows, type
java -classpath
.;
matlabroot\toolbox\javabuilder\jar\javabuilder.jar;
.\distrib\magicsquare.jar
-Djava.library.path=
matlabroot\bin\win32;.\distrib
getmagic 5
On UNIX, type
java -classpath
.:
matlabroot/toolbox/javabuilder/jar/javabuilder.jar:
./distrib/magicsquare.jar
-Djava.library.path=
matlabroot/bin/arch:./distrib
getmagic 5
Note If you set your system path to include a directory pointed by
java.library.path, you do not n eed to use the -D option.
See “Settings for Environment Variables (Development Machine)” on page
6-2 and for more information about setting paths correctly.
Note The supported JRE version is 1.5.0. To find out what JRE you are
using, refer to the output of
'version -java' in MATLAB or re fer to the
jre.cfg f ile in matlabroot/sys/java/jre/<arch> or mcrroot/sys/java/jre/<arch>.
1-21
Komentarze do niniejszej Instrukcji