• 카테고리

    질문 & 답변
  • 세부 분야

    백엔드

  • 해결 여부

    미해결

Error:java: error: release version 5 not supported

20.01.04 21:25 작성 조회수 6.64k

5

Error:java: error: release version 5 not supported

현재 자바8버전 이상인걸로 아는데

이런 메세지가 떴습니다.

검색해 보니

Settings -> Compiler -> Java Compiler

여기에서 버전이 1.5 인지 확인 하라는 글이 있어서 확인도 했는데 버전이 1.5입니다.

또 막혔습니다.

답변 6

·

답변을 작성해보세요.

23

pjs님의 프로필

pjs

2020.09.14

자바11 버전 사용 중 같은 문제가 발생해서 제가 해결할 수 있었던 방법 남깁니다 ㅎㅎ...

우선 pom.xml의 dependencies 태그 안에

<dependency>
    <groupId>javax.xml.bind</groupId>
     <artifactId>jaxb-api</artifactId>
    <version>2.3.0</version>
 </dependency>

을 넣고 pom.xml을 마우스 우클릭 후 maven -> reload project 합니다.

그리고 위의 탭들 중 File 탭에서

File -> Settings -> Build, Execution, Deployment -> Java Compiler 순으로 타고 들어가서

Java Compiler 내용들 중 Project bytecode version과 Per-module bytecode version 속 저희 프로젝트 이름 모듈의 Target bytecode version의 값을 둘다 8로 바꿔주니까 강사님처럼 동작되었습니다 ㅎㅎ

9

유종훈님의 프로필

유종훈

2020.11.07

자바11 사용시 아래와 같이 해결 하였습니다.

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
</plugins>
</build>

8

안녕하세요^^ 주태종님

pom.xml에 다음과 같이 <build>...</build> 부분을 추가하고 메이븐을 리플레시 하신 다음에 다시 실행해보세요^^

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>jpa-basic</groupId>
<artifactId>ex1-hello-jpa</artifactId>
<version>1.0.0</version>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<!-- JPA 하이버네이트 -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>5.3.10.Final</version>
</dependency>

<!-- H2 데이터베이스 -->
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.199</version>
</dependency>
</dependencies>

</project>

3

윤동열님의 프로필

윤동열

2021.03.19

안녕하세요. 저도 똑같은 오류를  마주쳐 해결했던 경험이 있어 공유합니다!

이렇게 하니 해결되었습니다. 

그래도 오류가 난다면, jdbc 연결 부분을 확인해보세요!

```java

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>jpa-basic</groupId>
<artifactId>ex1-hello-jpa</artifactId>
<version>1.0.0</version>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>



<dependencies>

<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>
<!-- JPA 하이버네이트 -->

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>5.3.10.Final</version>
</dependency>

<!-- H2 데이터베이스 -->
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.199</version>
</dependency>
</dependencies>

</project>

```

B#님의 프로필

B#

2021.09.16

저는 Settings -> Compiler -> Java Compiler 여기서 1.8로 버전을 바꿔주니까 해결됐어요

0

exit code 1이면 뭔가 문제가 있는것으로 보입니다. 현재 말씀하신 내용만으로는 정확한 파악이 어렵네요.

우선 강의 내용을 쭉 따라서 진행해보시고, 이슈가 발생하면 다시 문의 올려주세요^^

0

ㅌㅇ님의 프로필

ㅌㅇ

질문자

2020.01.04

바꾸니깐 됐어요 !

근데 실행하고 나서

콘솔창에 마지막에

Process finished with exit code 1

exit code 0 이 아니라 1로 나오는데 무슨 차이인가요?