| MATLAB® Compiler™ | ![]() |
| On this page… |
|---|
Path for Java Applications on All Platforms |
Regardless of platform, be aware of the following guidelines with regards to placing specific directories on the path:
Always avoid including bin or arch on the path. Failure to do so may inhibit ability to run multiple MCR instances.
Ideally, set the environment in a separate shell script to avoid runtime errors caused by path-related issues.
When your users run applications that contain compiled M-code, you must instruct them to set the path so that the system can find the MCR.
Note When you deploy a Java application to end users, they must set the class path on the target machine. The system needs to find .jar files containing the MATLAB libraries. To tell the system how to locate the .jar files it needs, specify a classpath either in the javac command or in your system environment variables. |
The following directory should be added to the system path:
mcr_root\version\runtime\win32
where mcr_root refers to the complete path where the MCR library archive files are installed on the machine where the application is to be run.
mcr_root is version specific; you must determine the path after you install the MCR.
Note For readability, the following commands appear on separate lines, but you must enter each setenv command on one line. The setenv command is specific to the C shell (csh). See Compiling and Linking MAT-File Programs for more information. |
setenv LD_LIBRARY_PATH mcr_root/version/runtime/glnx86: mcr_root/version/sys/os/glnx86: mcr_root/version/sys/java/jre/glnx86/jre1.6.0/lib/i386/native_threads: mcr_root/version/sys/java/jre/glnx86/jre1.6.0/lib/i386/server: mcr_root/version/sys/java/jre/glnx86/jre1.6.0/lib/i386: setenv XAPPLRESDIR mcr_root/version/X11/app-defaults
setenv LD_LIBRARY_PATH /usr/lib/lwp: mcr_root/version/runtime/sol64: mcr_root/version/sys/os/sol64: mcr_root/version/sys/java/jre/sol64/jre1.5.0/lib/sparcv9/native_threads: mcr_root/version/sys/java/jre/sol64/jre1.5.0/lib/sparcv9/server: mcr_root/version/sys/java/jre/sol64/jre1.5.0/lib/sparcv9/client: mcr_root/version/sys/java/jre/sol64/jre1.5.0/lib/sparcv9: setenv XAPPLRESDIR mcr_root/version/X11/app-defaults
setenv LD_LIBRARY_PATH mcr_root/version/runtime/glnxa64: mcr_root/version/sys/os/glnxa64: mcr_root/version/sys/java/jre/glnxa64/jre1.6.0/lib/amd64/native_threads: mcr_root/version/sys/java/jre/glnxa64/jre1.6.0/lib/amd64/server: mcr_root/version/sys/java/jre/glnxa64/jre1.6.0/lib/amd64: setenv XAPPLRESDIR mcr_root/version/X11/app-defaults
setenv DYLD_LIBRARY_PATH mcr_root/version/runtime/mac: mcr_root/version/sys/os/mac: mcr_root/version/bin/mac: /System/Library/Frameworks/JavaVM.framework/JavaVM: /System/Library/Frameworks/JavaVM.framework/Libraries setenv XAPPLRESDIR mcr_root/version/X11/app-defaults
setenv DYLD_LIBRARY_PATH mcr_root/version/runtime/maci: mcr_root/version/sys/os/maci: mcr_root/version/bin/maci: /System/Library/Frameworks/JavaVM.framework/JavaVM: /System/Library/Frameworks/JavaVM.framework/Libraries setenv XAPPLRESDIR mcr_root/version/X11/app-defaults
Note If you are running a version of Intel Mac later than 10.3, use the bsh, rather than the csh, shell. |
![]() | Directories Required for Development and Testing | Unsupported Functions | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |