title: Trouble importing Spring Boot Gradle project into Eclipse
body: <p>I have a Sprint Boot project that I built on another system that I'm trying to import into a new one into Eclipse (4.20.0), and I'm having some issue. It's a Gradle Spring Boot. My build.gradle file is below. I have JKD 16.0.1 install on the machine -- Windows 10.</p>
  <p>I've tried importing it with both the Gradle buildship and STS plugins. When I try the Buildship, it fails on the import preview with a big stack dump, with the top line:</p>
  <pre><code>org.gradle.tooling.BuildException: Could not fetch model of type 'GradleBuild' using connection to Gradle distribution 'https://services.gradle.org/distributions/gradle-6.8.3-bin.zip'.
  </code></pre>
  <p>When I try Gradle STS, when I hit the &quot;Build Model&quot; button, I tells me errors appeared and to check the log file. The interesting thing I find in there are these:</p>
  <pre><code>!ENTRY org.springsource.ide.eclipse.gradle.core 4 0 2021-06-18 17:38:25.575
  !MESSAGE Could not determine java version from '16.0.1'.
  !STACK 0
  java.lang.IllegalArgumentException: Could not determine java version from '16.0.1'.
  
  !MESSAGE Initialize project OrderCreate, Update preview failed due to an error in the referenced Gradle build.
  !STACK 0
  org.gradle.tooling.BuildException: Could not fetch model of type 'GradleBuild' using connection to Gradle distribution 'https://services.gradle.org/distributions/gradle-6.8.3-bin.zip'.
  
  Caused by: org.gradle.internal.exceptions.LocationAwareException: Initialization script 'C:\Workspaces\Java\K2\.metadata\.plugins\org.eclipse.buildship.core\init.d\eclipsePlugin.gradle'
  Could not compile initialization script 'C:\Workspaces\Java\K2\.metadata\.plugins\org.eclipse.buildship.core\init.d\eclipsePlugin.gradle'.
  
  Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
  General error during semantic analysis: Unsupported class file major version 60
  
  java.lang.IllegalArgumentException: Unsupported class file major version 60
  
  !ENTRY org.springsource.ide.eclipse.gradle.core 4 0 2021-06-18 17:45:56.693
  !MESSAGE Could not determine java version from '16.0.1'.
  !STACK 0
  java.lang.IllegalArgumentException: Could not determine java version from '16.0.1'.
  !MESSAGE Not properly disposed SWT resource
  !STACK 0
  java.lang.Error: SWT Resource was not properly disposed
  
  !MESSAGE Not properly disposed SWT resource
  !STACK 0
  java.lang.Error: SWT Resource was not properly disposed
  </code></pre>
  <p>I also tried building it from the terminal to get some clues. That gives me the &quot;Unsupported class file major version 60&quot; error.</p>
  <pre><code>Could not compile settings file 'C:\Workspaces\Java\K2\OrderCreate\settings.gradle'.
  &gt; startup failed:
    General error during semantic analysis: Unsupported class file major version 60
  </code></pre>
  <p>This looks like a real mess. Where do I start solving this?</p>
  <pre><code>plugins {
      id 'org.springframework.boot' version '2.4.5'
      id 'io.spring.dependency-management' version '1.0.11.RELEASE'
      id 'java'
      id 'eclipse'
      id &quot;com.diffplug.eclipse.apt&quot; version &quot;3.29.1&quot;
  }
  
  group = 'com.bw'
  version = '0.0.1-SNAPSHOT'
  sourceCompatibility = '11'
  
  repositories {
      mavenCentral()
  }
  
  ext {
      mapstructVersion = &quot;1.4.2.Final&quot;
  }
  
  dependencies {
      implementation 'org.springframework.boot:spring-boot-starter-artemis'
      implementation 'org.springframework.boot:spring-boot-starter-data-mongodb-reactive'
      implementation 'org.springframework.boot:spring-boot-starter-webflux'
      testImplementation 'org.springframework.boot:spring-boot-starter-test'
      testImplementation 'io.projectreactor:reactor-test'
      
      implementation(&quot;org.mapstruct:mapstruct:${mapstructVersion}&quot;)
      compileOnly &quot;org.mapstruct:mapstruct-processor:${mapstructVersion}&quot;
      annotationProcessor &quot;org.mapstruct:mapstruct-processor:${mapstructVersion}&quot;
      testAnnotationProcessor &quot;org.mapstruct:mapstruct-processor:${mapstructVersion}&quot;
      
      implementation('org.springframework.boot:spring-boot-starter-data-mongodb')
      testImplementation('de.flapdoodle.embed:de.flapdoodle.embed.mongo')
      implementation 'org.springframework.boot:spring-boot-starter-websocket'
      
      compile group: 'com.google.code.gson', name: 'gson', version: '2.8.5'
  }
  
  test {
      useJUnitPlatform()
  }
  </code></pre>
  <p>Error from Gradle Buildship:</p>
  <pre><code>org.gradle.tooling.BuildException: Could not fetch model of type 'GradleBuild' using connection to Gradle distribution 'https://services.gradle.org/distributions/gradle-6.8.3-bin.zip'.
      at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
  
  at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
  Caused by: org.gradle.internal.exceptions.LocationAwareException: Initialization script 'C:\Workspaces\Java\K2\.metadata\.plugins\org.eclipse.buildship.core\init.d\eclipsePlugin.gradle'
  Could not compile initialization script 'C:\Workspaces\Java\K2\.metadata\.plugins\org.eclipse.buildship.core\init.d\eclipsePlugin.gradle'.
      
  at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
  Caused by: org.gradle.groovy.scripts.ScriptCompilationException: Could not compile initialization script 'C:\Workspaces\Java\K2\.metadata\.plugins\org.eclipse.buildship.core\init.d\eclipsePlugin.gradle'.
      at 
  
  Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
  General error during semantic analysis: Unsupported class file major version 60
  
  java.lang.IllegalArgumentException: Unsupported class file major version 60
      at groovyjarjarasm.asm.ClassReader.&lt;init&gt;(ClassReader.java:196)
      at groovyjarjarasm.asm.ClassReader.&lt;init&gt;(ClassReader.java:177)
      at groovyjarjarasm.asm.ClassReader.&lt;init&gt;(ClassReader.java:163)
      at groovyjarjarasm.asm.ClassReader.&lt;init&gt;(ClassReader.java:284)
      at org.codehaus.groovy.ast.decompiled.AsmDecompiler.parseClass(AsmDecompiler.java:81)
      at org.codehaus.groovy.control.ClassNodeResolver.findDecompiled(ClassNodeResolver.java:251)
      at org.codehaus.groovy.control.ClassNodeResolver.tryAsLoaderClassOrScript(ClassNodeResolver.java:189)
  </code></pre>