Sunday, April 12, 2020

Kotlin Eclipse environment setup

Eclipse install the Kotlin plugin through the Marketplace , open Eclipse, select the Help-> Eclipse Marketplace ... menu, and search for the Kotlin plugin:
Then restart Eclipse, select Window-> Open Perspective-> Other ..., if you see the Kotlin option, the installation is successful.

Create new project
Select File-> New-> Kotlin Project to create Kotlin project:
After successful creation, the project structure is as follows:
Next, we click on the src folder to create a Kotlin file without writing ".kt". It is automatically added by default. It can be named arbitrarily. Here we create hello

Next, we write some code in the hello.kt file. Eclipse provides us with a template to do this quickly, just type main and press Enter.

Run the application
Next, we right-click the mouse in the edit box of hello.kt and select Run As-> Kotlin Application to run:
After running successfully, you can see the result in the Console window.

No comments:

Post a Comment