Hi, a `jvm/app` application with an explicit JDK 8...
# kotlin-toolchain
s
Hi, a
jvm/app
application with an explicit JDK 8 release target compiles fine, but it throws the following error at runtime on jdk8. I believe this is due to the Spring JAR launcher, which only supports JDK 17 and later. Is there a workaround? My app compiles fine for a JDK 8 target, and I need to support JDK 8 and beyond.
Copy code
java -jar build/tasks/_tzupdate_executableJarJvm/tzupdate-jvm-executable.jar
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/springframework/boot/loader/launch/JarLauncher has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:757)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:473)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
Copy code
settings:
  jvm:
    mainClass: MainKt
    release: 8
    storeParameterNames: true
    jdk:
      version: 25
      distributions: [ zulu ]
j
Thanks for the report! Indeed this is an issue. I'm AFK right now, would you mind opening a ticket for this? I would be super grateful! 🙏🏻
👍 1
s
j
Perfect thanks!