Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Specifying Java Startup Options

You can specify custom Java® startup options by creating a java.opts file, a text file containing one option per line. For example, use the -Dproperty=value command to assign a value to a system property.

Put the java.opts file in one of the following folders:

  • MATLAB® startup folder, if starting MATLAB from an operating system prompt. For more information, see MATLAB Startup Folder.

  • If there is no java.opts file in the startup folder, then MATLAB checks the matlabroot/bin/arch folder. matlabroot is the output of the matlabroot function. arch is the output of the MATLAB computer('arch') function, for example glnxa64.

    A java.opts file in this location applies to all users, but individual users might not have permissions to modify files there.

Do not use a java.opts file in the following situations:

  • To enable the use of the Java debugger, use the matlab -jdb command. For information, see matlab (Linux) or matlab (Mac).

  • To adjust the Java heap size on desktop versions of MATLAB, use Java Heap Memory Preferences.

  • To modify the static Java class path, create a javaclasspath.txt file. For information, see Static Path.

    To modify the library path, create a javalibrarypath.txt file. For information, see Locate Native Method Libraries.

  • To override built-in options that MATLAB specifies to Java at startup. Options in java.opts are appended to the end of the built-in list. Whether or not these additional options override built-in options is JVM-dependent and can change between Java versions. To see what options MATLAB provides to Java, run this command:

    java.lang.management.ManagementFactory.getRuntimeMXBean.getInputArguments

See Also

|

Related Examples

More About

Was this topic helpful?