java.lang.ClassNotFoundException in matlabR2014a
150 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
lida
el 17 de Oct. de 2015
Comentada: decg
el 28 de Jul. de 2022
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 comentarios
Takashi Li
el 11 de Dic. de 2016
I also get the same problem when I open MATLAB (R2016b) while PyCharm is running.
Matheus Torquato
el 13 de Mzo. de 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
Respuesta aceptada
Lane Maxwell
el 6 de Nov. de 2017
Editada: Lane Maxwell
el 3 de Mayo de 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 comentarios
Caroline Aitken
el 8 de Mzo. de 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
el 9 de Mzo. de 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.
Más respuestas (6)
Kristian Sørensen
el 23 de Dic. de 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 comentarios
Deependra Mishra
el 18 de Abr. de 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 comentario
Barna Erdei
el 19 de Abr. de 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 comentarios
Morakot Choetkiertikul
el 16 de Feb. de 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 comentarios
Seiwev Hu
el 7 de Jun. de 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 comentarios
Nick Ivanov
el 16 de Jul. de 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 comentarios
Ver también
Categorías
Más información sobre Startup and Shutdown en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!