Kotlin/JVM compiler options The Kotlin compiler for JVM compiles Kotlin source files into Java class files. … You can also use them for executing Kotlin script files.
Does Kotlin compile to Java or bytecode?
As stated in the official FAQs, “Kotlin produces Java compatible bytecode“, which means that the Kotlin compiler is capable of transforming all the nice features into JVM compatible instructions and this can even be observed using IntelliJ IDEA tools.
How does Kotlin compile?
- Create a simple application in Kotlin that displays “Hello, World!” . In your favorite editor, create a new file called hello. …
- Compile the application using the Kotlin compiler: $ kotlinc hello.kt -include-runtime -d hello.jar. …
- Run the application. $ java -jar hello.jar.