Kotlin compiling java files


#1

kotlinc can compile kotlin files, that use Java classes, even if Java classes are given as source files. So kotlinc in some way compiles them, but doesn’t make binary *.class files. Even when we put it into *.jar executable.

After compilation this *.jar executable can’t be executed.

Why wouldn’t kotlinc compile java files and put them to *.jar executable, so that the program can be executed?


#2

Because we see no reason to spend extra effort on supporting bytecode generation from Java source code when there are plenty of possibilities to compile Java and Kotlin together using the Java and Kotlin compilers.