I want to develop Desktop and Android applications. And I want to learn kotlin for this. Kotlin is mostly used for developing Android applications but I want to know that can we develop desktop applications in kotlin?
Yes, you can. Technically any program you can write in Java can also be written in Kotlin*. Of course it's even better when using frameworks that were specially tailored for Kotlin.
There are frameworks like TornadoFX built on top of JavaFX to build desktop UIs.
More recently, Compose has been generalized for Desktop apps (initially JetPack Compose for Android).
*More specifically, Kotlin/JVM compiles to Java bytecode, so you can use Kotlin to target any environment running a JVM that interprets this bytecode (provided the target bytecode version is at most that of the JVM, like in Java). As pointed out by @Tenfour04, GWT is not in this category because it directly works on the Java source code, not bytecode.
© 2022 - 2024 — McMap. All rights reserved.