Main Content

MATLAB Runtime Path Settings for Run-Time Deployment

General Path Guidelines

Regardless of platform, be aware of the following guidelines with regards to placing specific folders on the path:

  • Always avoid including arch on the path. Failure to do so may inhibit ability to run multiple MATLAB® Runtime instances.

  • Ideally, set the environment in a separate shell script to avoid run-time errors caused by path-related issues.

Path for Java Applications on All Platforms

When your users run applications that contain compiled MATLAB code, you must instruct them to set the path so that the system can find the MATLAB Runtime.


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.

Windows Path for Run-Time Deployment

The following folder should be added to the system path:


mcr_root refers to the complete path where the MATLAB Runtime 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 MATLAB Runtime.


If you are running the MATLAB Runtime installer on a shared folder, be aware that other users of the share may need to alter their system configuration.

Linux Paths for Run-Time Deployment

Use these setenv commands to set your MATLAB Runtime paths.


OS X Paths for Run-Time Deployment

Use these setenv commands to set your MATLAB Runtime paths.