What is the licensing order and license file search path for MATLAB?

126 次查看(过去 30 天)

采纳的回答

MathWorks Support Team
编辑:MathWorks Support Team 2023-9-15
MATLAB will first look for a license_info.xml file. 
If this file sets the licensing mode (licmode) to "online" or "onlinelicensing", then MATLAB will ignore all other license paths and files, and will instead communicate with MathWorks to authenticate your license. 
For more info on what the license_info.xml file should look like, and its file locations, please refer to the following article:
What does the license_info.xml file look like for New Licensing Technology and where should it be saved?
If the file does not exist or sets the licensing mode to "file", then MATLAB will search for licenses in the following order. In the below paths, note that "R20XXx" would pertain to your specific release, i.e. R2022b. 
  1. Any license files or license servers specified with the -c startup flag override all other entries on the license search path.
  2. MATLAB will check against the registry keys
    • HKEY_LOCAL_MACHINE\Software\FLEXlm License Manager\MLM_LICENSE_FILE
    • HKEY_LOCAL_MACHINE\Software\FLEXlm License Manager\LM_LICENSE_FILE
    • On Unix, it will check for /home/$USER/.flexlmrc instead
  3. MATLAB will check against the environment variables MLM_LICENSE_FILE or LM_LICENSE_FILE.
    • LM_LICENSE_FILE is checked first if both are set
  4. MATLAB will check the user's userprofile or home location
    • On Windows, this will be %appdata%\MathWorks\MATLAB\R20XXx_licenses
      • For example, C:\Users\username\AppData\Roaming\MathWorks\MATLAB\R2021a_licenses\
    • On Linux, this will be /home/$USER/.matlab/R20XXx_licenses
      • For example, /home/user/.matlab/R2021a_licenses/
    • On macOS, this will be /Users/$USER/Library/Application Support/MathWorks/MATLAB/
      • For R2016b and older /home/user/.matlab/R2021a_licenses/
  5. MATLAB will check in the "licenses" folder under the MATLAB installation. 
    • On Windows, this will be C:\Program Files\MATLAB\R20XXx\licenses
    • On MacOS, this will be /Applications/MATLAB_R20XXx/licenses
    • On Linux, this will be /usr/local/matlab/licenses
Note: In the license file locations, MATLAB will search for a license.dat first and then any .lic in alphabetical order.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Manage Products 的更多信息

标签

尚未输入任何标签。

产品


版本

R2008a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by