eunsol
293
2021-06-21 13:56:11
3
69

window gradlew build 에러


> Task :compileJava FAILED

Resolving global dependency management for project 'hello-spring'

Excluding [ognl:ognl, org.javassist:javassist]

Excluding []

Caching disabled for task ':compileJava' because:

  Build cache is disabled

Task ':compileJava' is not up-to-date because:

  Task has failed previously.

The input changes require a full rebuild for incremental task ':compileJava'.

:compileJava (Thread[Execution worker for ':',5,main]) completed. Took 0.457 secs.


FAILURE: Build failed with an exception.


* What went wrong:

Execution failed for task ':compileJava'.

> Could not target platform: 'Java SE 11' using tool chain: 'JDK 8 (1.8)'.

<! -- IDE -->

sts4

build path

  modulepath

      JRE System Libary [JavaSE-11]


<!-- 현재 버전 -->

java -version

openjdk version "1.8.0_282"

OpenJDK Runtime Environment (build 1.8.0_282-b08)

OpenJDK 64-Bit Server VM (build 25.282-b08, mixed mode)


<!-- 환경변수 --> 

JAVA_HOME C:\Program Files\ojdkbuild\java-1.8.0-openjdk-1.8.0.282-1\


안되는이유를 모르겟슴다..........




0
  • 답변 3

  • 상저씨
    830
    2021-06-21 14:24:00

    JAVA 11 버전을 필요하지만 JAVA 1.8을 사용해서그런거같네요

    openjdk 11로 환경변수바꿔서 다시해보세요~

  • 상저씨
    830
    2021-06-21 14:24:38

    아니면 IDE에서 프로젝트 셋팅을 1.8버전으로 셋팅하고 다시해보세여

  • eunsol
    293
    2021-06-21 15:19:19

    @상저씨


    IDE 라이브러리랑 설치된 자바 버전이 달라서 오류난거였네요 감사합니다~

  • 로그인을 하시면 답변을 등록할 수 있습니다.