Why does MATLAB fail to start when I plug my Mac into a docking station?

When I plug my Mac laptop into a docking station, MATLAB crashes with Java errors.
MATLAB starts normally outside of the docking station.
I am starting MATLAB with the default JVM.

 Respuesta aceptada

Some versions of MATLAB may fail to on Macs when plugged into the docking station. The Java configuration on your system may change when plugged into the docking station due to driver and device changes on the system. The issue can be resolved by setting the MATLAB_JAVA environment variable to point to MATLAB's internal Java. To do this:
Download the MATLAB_JAVA.plist file attached to this article.
Edit the file with TextEdit
Edit the path to your MATLAB app to your specific release. For example, for R2014b, change the line:
<string>/Applications/MATLAB_R20XXx.app/sys/java/jre/maci64/jre</string>
to
<string>/Applications/MATLAB_R2014b.app/sys/java/jre/maci64/jre</string>
Save this file to the ~/Library/LaunchAgents/ so it is read when when you log in with your specific username.
Restart your Mac.
MATLAB should now start both on and off the docking station.
For more information on setting MATLAB_JAVA and other environment variables on Mac, specifically on how this process works and what it will change, please see the below support article:
How do I set environment variables on Mac OS X?

Más respuestas (0)

Categorías

Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by