First you need to setup an environment variable that i have shown in previous video Click here
Step 1: Open any text editor and write the following code.
fun main(args: Array<String>) {
println(“Hello Dream Developers”)
}
Step 2: save the file with .kt extension.
Step 3: open cmd and go to the file saved location.
Step 4: to compile the code type following command in cmd.
kotlinc hello.kt -include-runtime -d hello.jar
Here, hello is the file name with kt and jar extension.
Step 5: To run the file type following command.
java -jar hello.jar
Here, hello is file name with jar extension.
Thank you !!!
Like || Share and Subscribe on youtube.
0 Comments