Easy Tutorial
❮ Kotlin Delegated Kotlin Generics ❯

Setting Up a Kotlin Eclipse Environment

Install the Kotlin plugin in Eclipse through the Marketplace. Open Eclipse, select Help -> Eclipse Marketplace… menu, and search for the Kotlin plugin:

Then restart Eclipse and select Window -> Open Perspective -> Other... If you see the Kotlin option, it indicates that the installation was successful.

Creating a New Project

Select File -> New -> Kotlin Project to create a Kotlin project:

After the creation is successful, the project structure will be as follows:

Next, we click on the src folder to create a Kotlin file, there is no need to write ".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 quickly complete this operation, just type main and press Enter.

Running the Application

Next, we right-click in the editor box of hello.kt and select Run As -> Kotlin Application to run it:

After running successfully, you can see the result in the Console window.

In this way, our first Kotlin code is running.

❮ Kotlin Delegated Kotlin Generics ❯