Kotlin with StandAlone Complier

                     What is standalone compiler

standalone compiler is a complier that provide  supportive files to compile and    execute your program for only one language.

ex : Jdk able to compile and execute only java code not php ,dotnet

People who dont like to work or practice on Ides like Netbeans and Eclipse
for those "StandAlone" compiler is the best option.


Click on following link to download Standalone kotlin compiler  :
https://github.com/JetBrains/kotlin/releases/tag/v1.1.51


after downloading compiler unzip it , you get multiple folders in it.

1. Develop your kotlin file
2. compile it
3. execute it

Develop

Open Notepad (Windows )  / Text Editor (Linux)  / Edie Text ( MAC) :

type following program and save with any name with dot "kt" extension  

Example

test.kt

fun main(args:Array<String>){
println("I Love Kotlin");
}

 Save this test.kt file in bin folder of kotlin compiler :

open ternminal or cmd and set kotlin path  on terminal :

ex :   cd kotlinc/bin


Command to compile kotlin file : 

kotlinc kotlinfile.kt
ex : kotlin test.kt



example - TestKt

this is compiler genrated name :

Command to execute your kotlin code : 

kotlin ClassFile
ex - kotlin TestKt











 

Comments

Popular posts from this blog

Filter In Javafx