If you use a java.opts file to set startup options, you can put the file in one of the following folders:
MATLAB® startup folder
matlabroot/bin/arch folder. A java.opts file in this location applies to all users, but individual users might not have permissions to modify files there.
If there is a java.opts file in both locations with settings that conflict, the setting in the file in the MATLAB startup folder takes precedence. Check both locations for existing java.opts files and then decide which one to modify.
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 (UNIX).
To adjust the Java heap size, use Java Heap Memory Preferences.
To modify the static Java class path, create a javaclasspath.txt file. For information, see The Static Path.
To modify the library path, create a javalibrarypath.txt file. For information, see Locating Native Method Libraries.