Since I can't comment yet, I'll add an answer, which might be helpful. I ran into "java.lang.Compiler" error too, but was using Maven. Wanted to build app with older Java version (Java 8) than my CI system runtime (Java 21) and had to wrap kie-maven-plugin execution into exec-maven-plugin with specific executable and arguments to get it working.