MATLAB Answers

MATLAB 2016a error: "The desktop configuration was not saved successfully"

74 views (last 30 days)
Stav on 17 Aug 2016
Commented: CARLOS RIASCOS on 27 Mar 2020
After a fresh install of MATAB 2016a (along side MATLAB 2015b) on a Win7 machine I get the following error message whenever I start MATLAB:
The desktop configuration was not saved successfully
I've seen previous posts about this problem, the suggestion on all of them boils down to checking file permissions for the preferences directory (i.e the directory returned by prefdir) and if that doesn't work then deleting MATLABDesktop.xml and restarting MATLAB.
I've tried both approaches and in fact the above message appears also when MATLAB is run as Administrator. It seems that MATLAB is able to write the MATLABDesktop.xml (it reappears after I delete it and restart MATLAB) but the file contents are always empty.
Possibly related: MATLAB R2016a doesn't save user setting. Similar to that case I have Oracle Java 8 set as MATLAB_JAVA, but I do not get any exception on startup except for the above error. My MATLAB 2015b installation uses the same MATLAB_JAVA but does not fail in saving my preferences.
Any help is appreciated.


Ivo on 23 Aug 2016
Same here on GNU/Linux (Ubuntu 16.04 64 bit), using a custom MATLAB_JAVA (java-8-openjdk-amd64). I am using a custom JAVA environment because it resolves some bugs wrt full-screen images.
Blake on 18 Feb 2017
I'm having this issue as well. I'm on Windows 10 Pro and using a custom MATLAB_JAVA (Server JRE I'm on MATLAB Student 2016b.
Using this particular version of Java also breaks the Help documentation, disallowing the contextual menu, copy/paste, and bookmark links in the documentation.
I can't go back to default MATLAB_JAVA path because MATLAB crashes whenever my computer resumes from sleep. Really frustrating.

Sign in to comment.

Answers (2)

denny on 6 Apr 2017
you should set your jre to jdk1.7.0_xx. The jdk1.8.0_121 can not pass the building jar.


Stav on 6 Apr 2017
Well this works - reverting to default JRE (1.7) and restarting MATLAB a couple of times makes the error go away. However, I do require Java 8 as my MATLAB JRE. This suggestion does give way to a simple workaround though -
  1. Swap to default JRE.
  2. Save a layout of the desktop configuration.
  3. Switch back to Java 8.
  4. When you start MATLAB select that saved layout to get the desktop back in order
Ugly. But works for now..
@denny I'm keeping your answer unaccepted still in hope that we'll get a response from MathWorks at some point that does allow smooth operation even with Java 8 set as JDK. Thanks.
Yong on 19 Sep 2017
I deleted java\jarext\saxon9-xpath.jar in the matlab installation location, then the error gone away, I can save layout. But I haven't fully test whether other functions break
Jiayi on 4 Apr 2019
Many thanks to @Yong's answer. Works perfect with R2016b under Ubuntu 18.04.

Sign in to comment.

Sign in to answer this question.

Translated by