Getting java.lang.ClassFormatError while initializing custom Form
Answered
I created a custom GUI form for my intellij plugin. I am trying to load this form in ModuleWizardStep. But when I try to instantiate the Object, I get the folloing exception. Any idea what might be causing this exception. Please note that I have custom code within the java class that corresponds to the form, but I have not touched/modified the generated code section within this file
When I try to run the following code, I get exception below
new InitializrProjectDetailsForm()
Exception
java.lang.ClassFormatError: Duplicate method name "$$$getFont$$$" with signature "(Ljava.lang.String;IILjava.awt.Font;)Ljava.awt.Font;" in class file in/oneton/idea/spring/assistant/plugin/initializr/metadata/io/spring/initializr/util/InitializrProjectDetailsForm
Any help is appreciated
Please sign in to leave a comment.
What IntelliJ IDEA version do you use?
See https://youtrack.jetbrains.com/v2/issue/IDEA-183708.
Update:
This issue is happening only when I chose the following option from settings.
And set Generate GUI into -> Java source file
Now I have changed the value of Generate GUI into -> Binary class files & the error is gone
My IntelliJ version
Also, the intellij version I'm using to test my plugin is 2017.2
i.e my plugin development is in IntelliJ IDEA 2017.3.4 (Community Edition) & plugin runtime(while testing) is 2017.2
Hi Ashok
Are you using gradle-intellij-plugin for plugin development?
I see this problem only when using gradle-intellij-plugin.. but if I use the traditional way (adding Intellij sdk), then this problem does not appear.
I have custom settings in the Settings and that is where it happens when the custom setting item is selected