여러가지 버전의 윈도우

증상

* What went wrong:
Execution failed for task ':sonar'.
> org/sonar/batch/bootstrapper/EnvironmentInformation has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

젠킨스 파이프라인을 이용해 SonarQube 정적분석을 실행하려고 할 때, 위와같은 에러 메세지가 발생하였습니다.

원인

위 에러는 Java 실행환경이 클래스파일 버전을 52.0까지 지원하지만, 컴파일된 버전의 클래스 버전이 55버전이라 발생한 문제입니다. 

해결책

가장 간단한 해결책은 Java Runtime을 더 최신 버전으로 업데이트하는 것입니다. 이렇게 하면 최신 버전의 클래스 파일도 인식할 수 있게 됩니다. Oracle 또는 OpenJDK 웹 사이트에서 Java Development Kit (JDK)의 최신 버전을 다운로드하여 설치할 수 있습니다.

 

참고자료

Java 버전 업데이트: https://www.oracle.com/java/technologies/javase-jdk13-downloads.html

 

Download the Latest Java LTS Free

Subscribe to Java SE and get the most comprehensive Java support available, with 24/7 global access to the experts.

www.oracle.com

클래스 파일 버전 다운그레이드: https://docs.oracle.com/javase/8/docs/technotes/tools/windows/javac.html#BABGBJCI

Gradle 설정: https://docs.gradle.org/current/userguide/java_plugin.html#sec:java_plugin_and_java_version

 

The Java Plugin

If a dependent project has changed in an ABI-compatible way (only its private API has changed), then Java compilation tasks will be up-to-date. This means that if project A depends on project B and a class in B is changed in an ABI-compatible way (typicall

docs.gradle.org

 

+ Recent posts