IDEA GUI Designer forms instrumentation failed with Java 11

I’m trying to migrate my swing project from Java 8 to Java 11. I encountered a problem with IDEA GUI Designer plugin. When I try to build the project, I get following error:

[ERROR] Failed to execute goal org.codehaus.mojo:ideauidesigner-maven-plugin:162.2038.2:javac2 (default) on project stockbox-provider-ib: command execution failed: Forms instrumentation failed for /Users/maciej/stockbox/providers/ib/src/com/goodsoft/stockbox/ib/view/IBConnectForm.form: /Users/maciej/stockbox/providers/ib/src/com/goodsoft/stockbox/ib/view/IBConnectForm.form: Class not found: javax.swing.JPanel -> [Help 1]

Until now, I was dealing with it by providing bootclasspath VM argument with paths to rt.jar and jce.jar in JRE, which includes Swing classes like below:

        <plugin>             <groupId>org.apache.maven.plugins</groupId>             <artifactId>maven-compiler-plugin</artifactId>             <version>3.5.1</version>              <configuration>                 <source>${java.version}</source>                 <target>${java.version}</target>                 <encoding>${project.build.sourceEncoding}</encoding>                 <executable>${env.JAVA_HOME}</executable>                 <compilerArguments>                     <bootclasspath>${env.JAVA_HOME}/jre/lib/rt.jar:${env.JAVA_HOME}/jre/lib/jce.jar</bootclasspath>                 </compilerArguments>             </configuration> 

Since Java 9 JDK no longer includes JRE, so I can’t point them. Moreover, Java 9+ doesn’t support bootclasspath VM argument. I have tried adding rt.jar and jce.jar from JDK 8 as global libraries in IntelliJ, but it didn’t solved the issue. I have also tried to point this jars in JDK 8, but it didn’t worked either.

Any ideas for a workaround?

Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.