Monday, October 28, 2019

Kotlin Eclipse environment setup

Eclipse installs the Kotlin plugin from the Marketplace, opens Eclipse, selects the Help -> Eclipse Marketplace... menu, and searches for the Kotlin plugin:
Kotlin Eclipse environment setup
Then restart Eclipse and select Window -> Open Perspective -> Other.... If you see the Kotlin option, the installation is successful.
Create a new project
Select File -> New -> Kotlin Project to create the Kotlin project:
After the creation is successful, the project structure is as follows:
Next, we click on the src folder to create a Kotlin file, without writing ".kt", the default is automatically added, it can be arbitrarily named, here we create hello


Next, we write the code in the hello.kt file. Eclipse gives us a template to do this quickly, just type main and press Enter
Next, we write the code in the hello.kt file. Eclipse gives us a template to do this quickly, just type main and press Enter.
After running successfully, you can see the results in the Window Console.

No comments:

Post a Comment