java.lang.ClassNotFoundException in matlabR2014a
150 次查看(过去 30 天)
显示 更早的评论
Dear All
Hi
Im 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?
thanks
2 个评论
Takashi Li
2016-12-11
I also get the same problem when I open MATLAB (R2016b) while PyCharm is running.
Matheus Torquato
2021-3-13
I'm calling MATLAB functions from my Python Script and all of the blue the code freezes and MATLAB show this same message.
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
采纳的回答
Lane Maxwell
2017-11-6
编辑:Lane Maxwell
2020-5-3
The culprit is likely the contents of the clipboard. Anything that's been copied while running the Jetbrains IDEs results in a serialized Java object being placed onto the clipboard. I assume that Matlab is reading this at startup and trying to do something with it.
There are a couple of ways to solve this. The simplest is to have an empty clipboard (or a clipboard that contains something copied outside of the Jetbrains IDEs) at the time you start Matlab.
The more flexible approach is to create a javaclasspath.txt file that contains the path to idea.jar. That jar file ships with intelliJ/PyCharm and the like. See this link for more information: Static Path - MATLAB & Simulink
7 个评论
Caroline Aitken
2022-3-8
Same wtih 2021b. This looks like it would be useful, but how EXACTLY do I do this? I'm not familiar enough with assigning flexible paths this way that the documentation also doesn't really help clarify. How does setting the file to contain idea.jar stop matlab from trying to look there? What do you mean by "the jar file ships with intelliJ"? I'm just not familiar enough with standard lingo and practice to understand what really needs to happen here. If you could clarify I would really appreciate it.
Lane Maxwell
2022-3-9
Hi Caroline,
Basically you have to add a file called javaclasspath.txt into your MATLAB preferences directory that contains the fully qualified path to the JAR file that contains the class in question, in this case that class is com.intellij.codeInsight.editorActions.FoldingData.
However, because that class is bundled in a jar provided by JetBrains when you install one of their products, they're free to move it around and whatnot, which they have done since I initially answered this back in 2017. That class is no longer in idea.jar, it is now in platform-impl.jar. So, on your computer, locate the platform-impl.jar file and add a line into javaclasspath.txt that points to this file, on my computer it is ~/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/213.6777.52/IntelliJ IDEA.app/Contents/lib/platform-impl.jar but it may be different for you.
You'll need to place the newly created javaclasspath.txt into your preferences directory for matlab, which you can find by opening matlab and running the command, prefdir. Place the file in the preferences directory and restart matlab. You can verify that it was added by running the command javaclasspath in matlab, you should see your entry at the bottom.
Even by doing this, there's a chance that you'll get other errors like if platform-impl.jar was compiled with a newer version of Java then MATLAB is using.
I have a couple other recommendations.
- Simply ignore the error message, it doesn't actually affect any functionality within MATLAB.
- Before you open MATLAB, clear your clipboard or copy something to it from outside of one of JetBrains' products.
更多回答(6 个)
Kristian Sørensen
2015-12-23
I get the same error when starting MATLAB 2015b while PyCharm CE 5.0.2 is running, and the problem disappears when PyCharm is not running.
3 个评论
Deependra Mishra
2019-4-18
I was running PyCharm earlier. Received same error with MATLAB 2019a. Copied a random text to clipboard and restarted the matlab, the error was gone.
Barna Erdei
2021-4-19
Hello, any news or solutions regarded to this topic?
I have the same error with Matlab R2020b and with the Pycharm started !
Any news about this error message ? How can we resolve this error messages ?
" 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
Exception "java.lang.ClassNotFoundException: com/intellij/openapi/editor/RawText"while constructing DataFlavor for: application/x-java-jvm-local-objectref; class=com.intellij.openapi.editor.RawText "
2 个评论
Morakot Choetkiertikul
2016-2-16
I also got the same problem when I open Matlab while IntelliJ is running.
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
0 个评论
Seiwev Hu
2017-6-7
I get the same error when I open MATLAB(R2014b) with the SPSS(22.0) running.
Exception "java.lang.ClassNotFoundException: com.spss.java_client.ui.doc_types.data.serialize.DataSerializer$DataCells"while constructing DataFlavor for: application/x-java-serialized-object; class=com.spss.java_client.ui.doc_types.da
0 个评论
Nick Ivanov
2020-7-16
I had this error with Android Studio open in Linux:
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
After closing the Android Studio, the error disappears.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!