License File Search Path

When you start MATLAB, it reads the License File to determine the host name and port address of the license server. MATLAB must contact the server to get licenses. MATLAB expects to find the License File, license.dat, in a standard location, but you can specify another location using either of the following methods:

Using Environment Variables to Specify the License File Location

You can specify the License File you want MATLAB to use by assigning a value to either of two environment variables, listed in the following table.

Environment VariablePurpose
LM_LICENSE_FILESpecifies the location of the License File for all applications using FLEXnet on this server.
MLM_LICENSE_FILESpecifies the location of the License File, but only for products of The MathWorks.

To create these environment variables on Windows systems, use the System Properties dialog box. For example, on Windows XP systems, right-click the My Computer icon on your desktop and select Properties. In the System Properties dialog box, select the Advanced tab. On this tab, click the Environment Variables button. On the Environment Variables dialog box, click the New button to create a variable.

Using the -c Option of the matlab Command

You can specify the License File that you want MATLAB to use when you start it by using the -c option with the matlab command. When you use the -c option, you explicitly prohibit the searching of the environment variables described in Using Environment Variables to Specify the License File Location. When using the -c option, keep in mind the following:


© 1984-2007 The MathWorks, Inc. Terms of Use Patents Trademarks Acknowledgments