'Intellij plugin development - class not found?
I'm getting a plugin exception when i run the plugin i've developed.
It says:
Caused by: java.lang.ClassNotFoundException: my/class.name.Here PluginClassLoader[plugins.flashcards, 1.0] com.intellij.ide.plugins.cl.PluginClassLoader@26537aa9 at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:63) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:348) at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.convertStub(ActionManagerImpl.java:140) ... 19 more
Presumably there is something missing or it's not bundling or something - I'm pretty much using the base build.gradle file and a pretty vanilla plugins.xml file, so I am unsure what is going wrong?
(Also, if someone wanted to make a plugins tutorial i would honestly just pay a lot of money for that right now, the actual documentation is crap!)
Solution 1:[1]
It is impossible to diagnose setup problems without seeing the actual code.
"the actual documentation is crap" If you have any constructive feedback, you're welcome to submit that as explained here https://www.jetbrains.org/intellij/sdk/docs/basics/platform_contributions.html
Solution 2:[2]
I can only guess since there is so little information provided but I ran into this exact same issue while following the walkthrough, so I hope I can help.
My issue was the source folder I created my package and class under. While Gradle was using src/main/kotlin/ as the source directory, I was attempting to create a Java class Action.
Telltale sign was the Gradle output stating that there were no Java files to compile.
Proper way to do this was to create a new folder for src/main/java/ and recreate my package structure and implement the Java classes I needed.
Problem was mixing Java into a Kotlin source folder. I am new to kotlin, please don't hurt me.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Yann Cébron |
| Solution 2 | Cam |
