Scratch file not working on IntelliJ IDEA

I am trying to run a Kotlin scratch file in IntelliJ, just like you are launching a scratch file in Java, but this will not work.

I created a new Kotlin scratch file, but I can’t run the code even after trying the following:

  • Create a function mainand type something inside.
  • Print anything with printlnout of the main function.
  • Create classwith a function maininside and printlnsomething.

When I create a new kotlin project, the project works fine. The problem occurs only with files with scratches. I am using the kotlin plugin version 1.1.51 on IntelliJ 2017.1

As the screenshot shows, the icon that allows you to run kotlin code does not appear to the left of the editor window:

enter image description here

+4
source share
1 answer

Your observations are correct, and this is a known problem .

+4
source

Source: https://habr.com/ru/post/1686722/


All Articles