Kotlin Eclipse environment building


Release date:2023-09-21 Update date:2023-10-13 Editor:admin View counts:371

Label:

Kotlin Eclipse environment building

Eclipse through Marketplace to install Kotlin plug-in, open Eclipse, select Help-> Eclipse Marketplace… menus, searching for Kotlin plug-in:

Image0

Then restart Eclipse and select Window-> Open Perspective-> Other…, if yousee it Kotlin option indicates that the installation was successful.

Image1

Create a new project

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

Image2

After successful creation, the project structure is as follows:

Image3

Next, let’s click src folder, creating a Kotlin files, no need to write. ".kt" is automatically added by default, and it can be named at will. Here we create hello

Image4

Image5

Next, we are in hello.kt to write some code in the file. Eclipse provides us with a template to do this quickly, just type main then press Enter , that’s it.

Image6

Run the application

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

Image7

After running successfully, you can run it in the window Console , you can see the results in.

Image8

So the first Kotlin code is running.

Powered by TorCMS (https://github.com/bukun/TorCMS).