Kotlin support for Java 9 and Java 10

What’s the plan for supporting Java 9 and Java 10 in Kotlin ?

Kotlin currently doesn’t support JVM 9 bytecode generation

6 Likes

Here’s an issue that tracks adding the JVM target bytecode version 9 to Kotlin: https://youtrack.jetbrains.com/issue/KT-21959. Meanwhile note that using JVM target 1.6 or 1.8 is completely fine because Java 9 and 10 fully support class files of previous versions.

For what cases do you need jvm 9/10 bytecode generation?

I don’t have any specific use cases, I agree to @udalov comment.

IMO, Java 9 and 10 has improved version of container integration in the language, so it will be good for kotlin to support Java 9 & 10 and can reuse that feature.

Also,

  1. Parallel Full GC for G1
  2. Compact Strings
  3. Enhanced Method Handles
  4. More Security features check here
  5. Improvements in byte code generation in enhanced for loop(Java 10)

Everything but item 5 does not require Java 9/10 byte code, just Java 9/10 JVM when running the program.
For me currently the only problem with Java 9 is that tornadofx uses hacks to access private javafx methods and therefore does not work on Java 9 JVM, but it has nothing to do with kotlin core.

3 Likes

In my opinion instead of adding support for Java 9, which no longer has support, and/or Java 10, which will lose support on September, they should wait for Java 11, which is the next LTS release.

6 Likes

The only principally new feature in Java 9-11 for kotlin is Jigsaw. It would be definitely nice to see kotlin as a Jigsaw module, but it would hardly change anything.

I think it is much more important to implement Java 8 features like invokedynamic and repeatable annotations.

8 Likes

This is a javac improvement, the Java 10 bytecode is unchanged (except for major/minor version)

2 Likes

I mean that you can compile it for JDK 8 and run on JDK 10 and still get all of the benefits. I am currently stuck with JDK 8 because tornadofx won’t compile on JDK 9. :frowning_face:

I can only support that the Kotlin team should concentrate on Java LTS releases (next is Java 11). The releases in between are not much more than public development snapshots. Oracle doesn’t even fix bugs reliably. Adjusting to a new version every six month is just a waste of time.

5 Likes

One big thing to add would be JEP 280: Indify String Concatenation

2 Likes

https://youtrack.jetbrains.com/issue/KT-21147

2 Likes

Oracles new release model and licensing is not as good as I thought! Only Oracle JDK will get Long Term Support (LTS) releases and if you use that in production, Oracle will charge you a fee. If you want to use Open JDK and want to have bug fixes and security patches, too, you have to update the JDK every 6 months. However, not all bugs will be fixed in the then current JDK, but sometimes only in the next release.

+1

For jlink

1 Like

thanks +1

Guys this forum has the heart feature for a reason. No need to spam “+1”.