lida
lida

Reputation: 177

java.lang.​ClassNotFo​undExcepti​on in matlabR2014a

I am using MATLAB R2014a. but sometimes give me following error:

Exception "java.lang.ClassNotFoundException: com.intellij.codeInsight.editorActions.FoldingData"while constructing DataFlavor for: application/x-java-jvm-local-objectref; class=com.intellij.codeInsight.editorActions.FoldingData

why? Of course I use pycharm IDE along with MATLAB. Is it because it?

Upvotes: 12

Views: 7806

Answers (4)

Shailesh Jain
Shailesh Jain

Reputation: 64

The error is caused when you copy something from intellij which stores serialized objects on the clipboard.

I found a workaround for this, you can just set the error stream to a different PrintStream than the console's err stream. See this code

PrintStream errStream = System.err;
System.setErr(new PrintStream("error.log"));

and use the errStream later on to set it back. It is just a work around if you don't want that error to be printed on the console.

Upvotes: 0

Al Fargnoli
Al Fargnoli

Reputation: 21

I had to copy something to the clipboard that was not from IntelliJ to get this to stop occurring. It was occurring even after I'd closed IntelliJ, presumably because of whatever remained in the Clipboard.

Upvotes: 2

user2461797
user2461797

Reputation: 281

See this answer: Why/How is IntelliJ causing debug output in Netbeans?

This is not related to any setup you've done within MATLAB -- it's apparently something that IntelliJ, WebStorm, or PyCharm has put into the clipboard. It goes away if you don't have one of those programs running at the same time.

Upvotes: 13

user5494520
user5494520

Reputation:

This error indicates that MATLAB is not able to locate or read your MATLAB preferences directory. This could be due to a setting or variable on your system which is causing MATLAB to look for your preferences in a location where you do not have read access.

Typically this happens due to running a configuration script for MATLAB such as 'config_matlab.sh' which attempts to set your preferences directory to a non-default location where you do not have read or write access. You should start by removing the portion of the script which sets your environment variable.

You should choose a directory where you have both read and write access. The default location is in your home folder.

Upvotes: 5

Related Questions