MATLAB: Do I receive a Java error related to the Command History in MATLAB

colorprefcommanderrorhistoryjavaMATLABnullpointerexception

The output in the Command Window is the following:
Exception occurred during event dispatching:
java.lang.NullPointerException
at
com.mathworks.ide.cmdline.CommandHistory$HistoryList.getCommentColorPref(CommandHistory.java:2101)
at
com.mathworks.ide.cmdline.CommandHistory$HistoryList.<init>(CommandHistory.java:2087)
at
com.mathworks.ide.cmdline.CommandHistory.<init>(CommandHistory.java:1488)
at
com.mathworks.ide.cmdline.CommandHistory.addLine(CommandHistory.java:1135)
at
com.mathworks.ide.cmdline.MatlabCommandWidget.sendCommand(MatlabCommandWidget.java:3533)
at
com.mathworks.ide.cmdline.MatlabCommandWidget.doEnterKey(MatlabCommandWidget.java:4643)
at
com.mathworks.ide.cmdline.MatlabCommandWidget.access$29(MatlabCommandWidget.java:4630)
at
com.mathworks.ide.cmdline.MatlabCommandWidget$KeyEventHandler.doEmacsKeys(MatlabCommandWidget.java:4817)
at
com.mathworks.ide.cmdline.MatlabCommandWidget$KeyEventHandler.keyPressed(MatlabCommandWidget.java:4784)
at java.awt.AWTEventMulticaster.keyPressed(Unknown Source)
at java.awt.AWTEventMulticaster.keyPressed(Unknown Source)
at java.awt.AWTEventMulticaster.keyPressed(Unknown Source)
at java.awt.Component.processKeyEvent(Unknown Source)
at
com.mathworks.mwt.MWComponent.processKeyEvent(MWComponent.java:548)
...
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown
Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Best Answer

To fix the problem, you will need to regenerate your MATLAB preferences. The instructions are available at:
Related Question