title: Unable to run Spring Boot with Kotlin project in Eclipse
body: <p>I have <code>Eclipse Photon</code> with <code>Kotlin plugin for Eclipse 0.8.6</code> and <code>Spring Tools 3.9.5.RELEASE</code> plugins installed. I followed <a href="https://docs.spring.io/sts/nan/v373/SpringToolSuiteAndKotlin.html" rel="nofollow noreferrer">these</a> instructions and created a new project with wizard:</p>
  
  <p><a href="https://i.stack.imgur.com/Ng8vq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ng8vq.png" alt="enter image description here"></a></p>
  
  <p>Then I created a new <code>Run Configuration</code> and edited the main class as instructed in the reference:</p>
  
  <p><a href="https://i.stack.imgur.com/aP7Zi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aP7Zi.png" alt="enter image description here"></a> </p>
  
  <p>After running project, I got this error:</p>
  
  <pre><code>Error: Could not find or load main class com.kotlinexample.KotlinExampleApplicationKt
  Caused by: java.lang.ClassNotFoundException: com.kotlinexample.KotlinExampleApplicationKt
  </code></pre>
  
  <p>I've checked my <code>build.gradle</code> with <a href="https://spring.io/guides/tutorials/spring-boot-kotlin/" rel="nofollow noreferrer">this</a> documentation and it seems OK:</p>
  
  <pre><code>buildscript {
      ext {
          kotlinVersion = '1.2.51'
          springBootVersion = '2.0.4.RELEASE'
      }
      repositories {
          mavenCentral()
      }
      dependencies {
          classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
          classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
          classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}")
      }
  }
  
  apply plugin: 'kotlin'
  apply plugin: 'kotlin-spring'
  apply plugin: 'eclipse'
  apply plugin: 'org.springframework.boot'
  apply plugin: 'io.spring.dependency-management'
  
  group = 'com.kotlinexample'
  version = '0.0.1-SNAPSHOT'
  sourceCompatibility = 1.8
  compileKotlin {
      kotlinOptions {
          freeCompilerArgs = ["-Xjsr305=strict"]
          jvmTarget = "1.8"
      }
  }
  compileTestKotlin {
      kotlinOptions {
          freeCompilerArgs = ["-Xjsr305=strict"]
          jvmTarget = "1.8"
      }
  }
  
  repositories {
      mavenCentral()
  }
  
  dependencies {
      compile('org.springframework.boot:spring-boot-starter-thymeleaf')
      compile('org.springframework.boot:spring-boot-starter-web')
      compile('com.fasterxml.jackson.module:jackson-module-kotlin')
      compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
      compile("org.jetbrains.kotlin:kotlin-reflect")
      runtime('com.h2database:h2')
      testCompile('org.springframework.boot:spring-boot-starter-test')
  }
  </code></pre>