Compile Kotlin and run jar


Kotlin is a statically typed programming language that runs on the Java virtual machine and also can be compiled to JavaScript source code or use the LLVM compiler infrastructure. It is sponsored and developed by JetBrains. While the syntax is not compatible with Java, the JVM implementation of the Kotlin standard library is designed to interoperate with Java code and relies on Java code from the existing Java Class Library, such as the collections framework.[2] Kotlin uses aggressive type inference to determine the types of values and expressions for which type has been left unstated. This reduces language verbosity relative to Java, which demands often entirely redundant type specifications prior to version 10. Kotlin code can run on JVM up to latest Java 11.

Comparison to Java Programming Language
Some Java issues addressed in Kotlin

Kotlin fixes a series of issues that Java suffers from:

Null references are controlled by the type system.
No raw types
Arrays in Kotlin are invariant
Kotlin has proper function types, as opposed to Java’s SAM-conversions
Use-site variance without wildcards
Kotlin does not have checked exceptions

What Java has that Kotlin does not

What Kotlin has that Java does not

So how to run it….

Download Java JRE

Dowload a Kotlin compiler, store the compiler in c:\Program Files, add the path to system env vars.

Check Java and Kotlin

Make a Class.kt

Compile it and run the jar

Make a change to the class and compile again