java.lang.ClassNotFoundException in matlabR2014a
150 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Takashi Li
le 11 Déc 2016
I also get the same problem when I open MATLAB (R2016b) while PyCharm is running.
Matheus Torquato
le 13 Mar 2021
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
Réponse acceptée
Lane Maxwell
le 6 Nov 2017
Modifié(e) : Lane Maxwell
le 3 Mai 2020
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 commentaires
Caroline Aitken
le 8 Mar 2022
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
le 9 Mar 2022
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.
Plus de réponses (6)
Kristian Sørensen
le 23 Déc 2015
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 commentaires
Deependra Mishra
le 18 Avr 2019
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.
1 commentaire
Barna Erdei
le 19 Avr 2021
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 commentaires
Morakot Choetkiertikul
le 16 Fév 2016
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 commentaires
Seiwev Hu
le 7 Juin 2017
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 commentaires
Nick Ivanov
le 16 Juil 2020
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 commentaires
Voir également
Catégories
En savoir plus sur Startup and Shutdown dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!