A general question, what Java/JVM version should y...
# announcements
f
A general question, what Java/JVM version should you run on if you are running a server in purely kotlin? I am currently on
kotlinOptions.jvmTarget = "1.8"
and that feels a bit ancient, I have not really followed what has happened to to jvm since the Stream API basically. What is a sensible version to run the latest kotlin versions on now? Are there any performance improvements for kotlin?
k
Note that the steam api is totally unrelated to the JVM, that's purely a java thing.
f
Ah okay, I know they are unrelated but I thought the introduction of such a big shift required some new JVM instructions
k
AFAIK Kotlin doesn't target anything above 1.8 yet, but you can and probably should still run on the newest JVM possible for performance and bug fixes.
f
Java 8 was maybe a much bigger release on the Java side then on the JVM side then maybe
s
if you use Kotlin version >=1.3.30 you can set the jvmTarget to newer versions 9-12. There are no performance improvements yet, but there will be, so that’s where i’d start. https://blog.jetbrains.com/kotlin/2019/04/kotlin-1-3-30-released/#more-6991
👍 3
f
Alright, great 🙂 upgrading the JVM always felt like packing up and moving to a new universe, have a hard time getting used to the JVMs new release schedule
k
There are special JVM instructions, but they're not necessary. There's an issue about the Kotlin compiler actually using them, can't find it easily on mobile though.