Starting with Kotlin!

To start coding with Kotlin, you need three things installed on your computer:

  1. IDE – interface or environment that takes Kotlin code and run it [Download it here]
    There are number of options for this, Eclipse is one of the oldest ones available to write and run codes. Android studio is there too which to me is just same as Jetbarin’s own InjtelliJ IDEA. So I am using IntelliJ and will be doing upcoming posts in the same. Download the community version as that one is free.
  2. Java Runtime Environment – JRE [Download it here]
    Download whatever is latest. At the time of writing this post, it is version 8. Just select the one that is compatible with your operating system.
  3. Java Development Kit – JDK [Download it here]
    JDM is also version 8 at the time of writing this post. Same instructions apply as JRE for JDK.

Once these three are installed you will probably be able to run IntelliJ without any problems and if you do then we are all set to code. Sometimes we only come to know that its giving errors once we start coding. So do check their support forums and some google search might help. Problems are very generic and numerous so can’t discuss all of them here effectively.

Running any of these environments does require some juice as they are quite hungry of RAM and CPU. So do expect hiccups and your system having brain freeze type behavior if you are low on RAM or CPU power.


Once you click the icon you will have the following screen:

As I assume you are really new, you will have no projects already so go ahead and click Create New Project. Clicking it will give you this:

Yes you guessed it right, from the left column we will select Kotlin and in the right window we will select Kotlin (JVM). Click Next and you will have the following screen:

Just give whatever name you like and click Finish button and you reach here:

Click on the arrow with myfirstproject folder to expand it and right click on src folder and then move your cursor to new > left click on Kotlin file:

It will ask you to name your file. Just give it any. I used first click OK and you will something like this:

To check if everything is fine, paste the following code in the right area and hit SHIFT+F10:

It should get processed (after a little while) and output been shown in a split window at the bottom like this:

Awesome. You have done a great job for today! We are all set to learn Kotlin programming and ultimately build apps soon enough!

Leave a Reply

Notify of