Title
r

robfletcher

03/18/2021, 2:49 PM
Anyone else see
java.lang.NoClassDefFoundError: Could not initialize class org.jetbrains.kotlin.com.intellij.pom.java.LanguageLevel
trying to run a Gradle build with Kotlin scripts under
buildSrc
using the new Zulu JDK 16?
c

christophsturm

03/18/2021, 2:51 PM
i see it with adoptopenjdk-16
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected void java.util.ResourceBundle.setParent(java.util.ResourceBundle) accessible: module java.base does not "opens java.util" to unnamed module @324e4822
r

robfletcher

03/18/2021, 2:53 PM
Just having it installed seems to be enough. Even if I set
JAVA_HOME
to a different version
c

christophsturm

03/18/2021, 2:54 PM
maybe it destroys something when the exception occurs in jdk 16
r

robfletcher

03/18/2021, 2:58 PM
Tried the Strikt CI build on GitHub too and I see the same thing there
c

christophsturm

03/18/2021, 2:58 PM
oh i think its the kotlin compiler daemon
after a killall java it works again with < jdk 16
r

robfletcher

03/18/2021, 3:00 PM
huh, seems to work with
gradle --no-daemon
too
even with
JAVA_HOME
set to 16
c

christophsturm

03/18/2021, 3:01 PM
not for me…
maybe you have a kotlin compiler daemon running with a differnt jdk?
i think the kotlin daemon is independent from --no-daemon
in idea everything works fine even with jdk 16
r

robfletcher

03/18/2021, 3:04 PM
Not sure I even have that enabled,
killall java
only seemed to kill IntelliJ for me
c

christophsturm

03/18/2021, 3:06 PM
for me it kills everything except intellij
r

robfletcher

03/18/2021, 3:10 PM
however, since running
killall java
the problem seems to have gone away even if I don’t use
--no-daemon
c

christophsturm

03/18/2021, 3:10 PM
even with jdk 16?
r

robfletcher

03/18/2021, 3:11 PM
Yep. Wonder why it doesn’t work on GitHub actions’ container
I get another error but much further along
and even if I
rm -fr buildSrc/build
it does’t recur
t

tapchicoma

03/18/2021, 3:20 PM
Kotlin will support JDK 16 in
1.5.0
release
👍 1
c

christophsturm

03/18/2021, 4:52 PM
will kotlin 1.5.0 release with idea 2021.1?
t

tapchicoma

03/18/2021, 4:55 PM
I think no, IDEA will be released earlier. But I may be mistaken