Why does MATLAB fail to start without any error after changing my Java Heap Size?

3 views (last 30 days)
After attempting to change my Java heap size, MATLAB fails to start. The splash screen is briefly displayed and then vanishes. No error logs are generated.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 21 Nov 2014
Check to see if the _JAVA_OPTIONS environment variable is set with the -Xmx option. This option will limit the maximum Java heap size and can prevent MATLAB from starting if the value is to small.
How you find or unset this environment variables depends on your Operating System:
Windows
======
1. Right-click the My Computer (or Computer) icon and select Properties.
2. In the System Properties window, go to the Advanced tab and click the Environment Variables button near the bottom.
3. Under the User variables and System variables, check for a _JAVA_OPTIONS variable.
4. Either delete this variable, or if you are specify multiple options remove the section including -Xmx
Linux/Unix/Mac
==========
The _JAVA_OPTIONS variable can be unset for a single terminal session by running the below:
unset _JAVA_OPTIONS
To persistently remove the variable you will need to locate the file in which it is being set. Check in /etc/profile, /etc/environment /etc/bash.bashrc or ~.bashrc.
For more information, please see Oracle's documentation on specifying Java heap size via the -X command line options:
https://docs.oracle.com/cd/E13150_01/jrockit_jvm/jrockit/jrdocs/refman/optionX.html

More Answers (0)

Categories

Find more on Debugging and Analysis in Help Center and File Exchange

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!