MATLAB Runtime Startup Options

Set MATLAB Runtime Options

For a standalone executable, set MATLAB® Runtime options by specifying the -R switch and arguments. You can set options from either of the following:

  • The Additional Runtime Settings area of the compiler apps.

  • The mcc command.

Note

Not all options are available for all compilation targets.

Use a Compiler App

In the Additional Runtime Settings area of the compiler apps, you can set the following options.

MATLAB Runtime Startup OptionDescriptionSetting
-nojvmDisable the Java® Virtual Machine (JVM™), which is enabled by default. This can help improve the MATLAB Runtime performance.Select the No JVM check box.
-nodisplayOn Linux®, open the MATLAB Runtime without display functionality.In the Settings box, enter -R -nodisplay.
-logfileWrite information about the MATLAB Runtime startup to a logfile.Select the Create log file check box. Enter the path to the log file, including the log file name, in the Log File box.
-startmsgSpecify message to be displayed when the MATLAB Runtime begins initialization.In the Settings box, enter -R 'startmsg, message text'.
-completemsgSpecify message to be displayed when the MATLAB Runtime completes initialization.In the Settings box, enter -R 'completemsg, message text'.

Set MATLAB Runtime Startup Options Using the mcc Command Line

When you use the command line, specify the -R switch to invoke the MATLAB Runtime startup options you want to use.

Following are examples of using mcc -R to invoke -nojvm, -nodisplay, and -logfile when building a standalone executable (designated by the -m switch).

 Set -nojvm

 Set -nodisplay (Linux Only)

 Set -logfile

 Set -nojvm, -nodisplay, and -logfile with One Command