Main Content

Compiler Tips

Deploying Applications That Call the Java Native Libraries

If your application interacts with Java®, you need to specify the search path for native method libraries by editing librarypath.txt and deploying it.

  1. Copy librarypath.txt from matlabroot/toolbox/local/librarypath.txt.

  2. Place librarypath.txt in <mcr_root>/<ver>/toolbox/local.

    <mcr_root> refers to the complete path where the MATLAB® Runtime library archive files are installed on your machine.

  3. Edit librarypath.txt by adding the folder that contains the native library that your application's Java code needs to load.

Using the VER Function in a Compiled MATLAB Application

When you use the VER function in a compiled MATLAB application, it will perform with the same functionality as if you had called it from MATLAB. However, be aware that when using VER in a compiled MATLAB application, only version information for toolboxes which the compiled application uses will be displayed.