Javatpoint Logo
Javatpoint Logo

Kotlin Hello World Program in Command line.

To write Kotlin program, we can use any text editor like: Notepad++. Put the following code into any text file and save.

Save the file with name hello.kt, .kt extension is used for Kotlin file.

Compile Kotlin File

Open command prompt and go to directory location where file is stored. Compile hello.kt file with following command.


Kotlin Hello World Program in Command line 1

Run Kotlin File

To run the Kotlin .jar (hello.jar) file run the following command.


Kotlin Hello World Program in Command line 2





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA