MATLAB: Do I receive an error when trying to drag and drop commands from the Command History window to the Command Window in MATLAB 7.0.1 (R14SP1) on MacOS

commanddragdroperrorhistoryjavamacMATLAB

When I am dragging a command from the Command History window to the Command Window, I receive the following error message:
java.lang.NullPointerException
at apple.awt.CDropTargetContextPeer.flushEvents(CDropTargetContextPeer.java:51)

Best Answer

This might be caused by a problem with the Mac Java version. You can resolve the problem by downloading the Java 1.4.2 version from the Apple web site.
As a workaround in MATLAB, recall previous statements in the Command Window by using the up arrow, instead of dragging and dropping commands from the Command History window.
Some MATLAB users have reported that re-installing MATLAB resolved this issue.