In this article, we will see how to setup the environment for Kotlin on command line compiler.
Prerequisite to install Kotlin –
Kotlin runs on Java Virtual Machine, so it is necessary to install JDK and set the path in local system environment variable. To install the JDK and JRE in your system and set the path in environment variable, please refer this article – Setting up the environment in Java.
Download the Kotlin compiler –
You can download the latest version of standalone compiler of kotlin form Github Releases. Now the latest version is 1.3.31.
Setup the Kotlin compiler for command line –
- First of all, extract the downloaded file in any location where you have write access.
- Copy path upto bin directory of kotlinc.
- Now open my computer properties ->Advance System setting and then click on environment variables.
- Click on the path in system variables then edit button.
- Now paste the copied path of bin directory here and click ok -> ok -> ok.
- Verify the installation by typing kotlinc in command prompt.
- Kotlin Data Types
- Hello World program in Kotlin
- Kotlin | Retrieve Collection Parts
- Destructuring Declarations in Kotlin
- DatePicker in Kotlin
- Kotlin labeled continue
- Introduction to Kotlin
- Kotlin Type Conversion
- Kotlin Exception Handling | try, catch, throw and finally
- Kotlin if-else expression
- Kotlin constructor
- Kotlin Environment setup with Intellij IDEA
- Kotlin Nested class and Inner class
- Kotlin Variables
- Kotlin Operators
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.