Jacket JMC

From Jacket Wiki

Jump to: navigation, search
Back to Documentation

When Jacket applications have completed the development, test, and optimization stages and are ready for deployment, Jacket JMC allows users to create standalone, license-free executables for deployment to larger user bases via the MATLAB® Compiler.

Jacket JMC is available by default with every Jacket trial license; however, executables generated with a trial license will also expire at the end of the trial. For purchased licenses, the Jacket JMC license add-on is required to generate non-expiring executables.

Contents

Requirements for Compiling

  1. MATLAB installation with the MATLAB Compiler (MCC)
  2. A Jacket application with all m-files in one directory. No addpath statements are allowed in the application. The main executable M-file must take no arguments.

Generating the Executable

Jacket JMC allows you to use the MATLAB Compiler (mcc) to create standalone executables for deployment. To create the executable, MCC is invoked in the regular manner, specifying that Jacket should be included. Jacket JMC works behind the scenes to make sure that the executable runs Jacket code.

The following command may be used to invoke mcc (from a MATLAB window / command window)

mcc -a <jacket_root>/engine/ -m <MAIN EXECUTABLE M-FILE>

Alternately, Deploytool can be used to specify the same settings using a GUI.

For Linux, all the shared library files (.so files) located in <jacket_root>/engine/lib(64) must be placed in the executable directory. The entire process can be easily done using this script.

Requirements for Running

  1. MATLAB Compiler Runtime (MCR) - What is MCR and Where Do I Get It?
  2. For Windows systems, the path to the [MCR version] directory in the MCR Installation must be included in the PATH environment variable.

Running the Executable

  • On Windows Systems, double click the exe file corresponding to the main application file.
  • On Linux Systems, run the .sh file created with the argument <MCR_ROOT_LOCATION>/[MCR Version], as follows:
sh filename.sh <MCR_ROOT_LOCATION>/<MCR Version>
  • *NOTE: The [MCR Version] argument should be identical to the version of the Matlab compiler used to generate the executable. This depends on the version of MATLAB you are using. For example, MATLAB R2010-A uses v713, 2009B uses v711.
Personal tools