LANGUAGE/!$%!% ERROR NOTE 2017. 1. 30. 16:39

!markdown


#Java (자바)


### Error (오류)

```

warning: javax\servlet\http\HttpServletRequest.class(javax\servlet\http:HttpServletRequest.class): major version 51 is newer than 50, the highest major version supported by this compiler.

It is recommended that the compiler be upgraded.

warning: javax\servlet\http\HttpServletResponse.class(javax\servlet\http:HttpServletResponse.class): major version 51 is newer than 50, the highest major version supported by this compiler.

It is recommended that the compiler be upgraded.

warning: javax\servlet\http\HttpSession.class(javax\servlet\http:HttpSession.class): major version 51 is newer than 50, the highest major version supported by this compiler.

It is recommended that the compiler be upgraded.

warning: javax\servlet\Filter.class(javax\servlet:Filter.class): major version 51 is newer than 50, the highest major version supported by this compiler.

It is recommended that the compiler be upgraded.

warning: javax\servlet\FilterChain.class(javax\servlet:FilterChain.class): major version 51 is newer than 50, the highest major version supported by this compiler.

It is recommended that the compiler be upgraded.

warning: javax\servlet\FilterConfig.class(javax\servlet:FilterConfig.class): major version 51 is newer than 50, the highest major version supported by this compiler.

It is recommended that the compiler be upgraded.

warning: javax\servlet\ServletContext.class(javax\servlet:ServletContext.class): major version 51 is newer than 50, the highest major version supported by this compiler.

It is recommended that the compiler be upgraded.

warning: javax\servlet\ServletException.class(javax\servlet:ServletException.class): major version 51 is newer than 50, the highest major version supported by this compiler.

It is recommended that the compiler be upgraded.

warning: javax\servlet\ServletRequest.class(javax\servlet:ServletRequest.class): major version 51 is newer than 50, the highest major version supported by this compiler.

It is recommended that the compiler be upgraded.

warning: javax\servlet\ServletResponse.class(javax\servlet:ServletResponse.class): major version 51 is newer than 50, the highest major version supported by this compiler.

It is recommended that the compiler be upgraded.

warning: javax\servlet\http\HttpServletRequest.class(javax\servlet\http:HttpServletRequest.class): major version 51 is newer than 50, the highest major version supported by this compiler.

It is recommended that the compiler be upgraded.

warning: javax\servlet\http\HttpServletResponse.class(javax\servlet\http:HttpServletResponse.class): major version 51 is newer than 50, the highest major version supported by this compiler.

It is recommended that the compiler be upgraded.

warning: javax\servlet\http\HttpSession.class(javax\servlet\http:HttpSession.class): major version 51 is newer than 50, the highest major version supported by this compiler.

It is recommended that the compiler be upgraded.

warning: javax\servlet\Filter.class(javax\servlet:Filter.class): major version 51 is newer than 50, the highest major version supported by this compiler.

It is recommended that the compiler be upgraded.

warning: javax\servlet\FilterChain.class(javax\servlet:FilterChain.class): major version 51 is newer than 50, the highest major version supported by this compiler.

It is recommended that the compiler be upgraded.

warning: javax\servlet\FilterConfig.class(javax\servlet:FilterConfig.class): major version 51 is newer than 50, the highest major version supported by this compiler.

It is recommended that the compiler be upgraded.

warning: javax\servlet\ServletContext.class(javax\servlet:ServletContext.class): major version 51 is newer than 50, the highest major version supported by this compiler.

It is recommended that the compiler be upgraded.

warning: javax\servlet\ServletException.class(javax\servlet:ServletException.class): major version 51 is newer than 50, the highest major version supported by this compiler.

It is recommended that the compiler be upgraded.

warning: javax\servlet\ServletRequest.class(javax\servlet:ServletRequest.class): major version 51 is newer than 50, the highest major version supported by this compiler.

It is recommended that the compiler be upgraded.

warning: javax\servlet\ServletResponse.class(javax\servlet:ServletResponse.class): major version 51 is newer than 50, the highest major version supported by this compiler.

It is recommended that the compiler be upgraded.

warning: javax\servlet\http\HttpServletRequest.class(javax\servlet\http:HttpServletRequest.class): major version 51 is newer than 50, the highest major version supported by this compiler.

It is recommended that the compiler be upgraded.

warning: javax\servlet\http\HttpServletResponse.class(javax\servlet\http:HttpServletResponse.class): major version 51 is newer than 50, the highest major version supported by this compiler.

It is recommended that the compiler be upgraded.

warning: javax\servlet\http\HttpSession.class(javax\servlet\http:HttpSession.class): major version 51 is newer than 50, the highest major version supported by this compiler.

It is recommended that the compiler be upgraded.

warning: javax\servlet\Filter.class(javax\servlet:Filter.class): major version 51 is newer than 50, the highest major version supported by this compiler.

It is recommended that the compiler be upgraded.

warning: javax\servlet\FilterChain.class(javax\servlet:FilterChain.class): major version 51 is newer than 50, the highest major version supported by this compiler.

It is recommended that the compiler be upgraded.

warning: javax\servlet\FilterConfig.class(javax\servlet:FilterConfig.class): major version 51 is newer than 50, the highest major version supported by this compiler.

It is recommended that the compiler be upgraded.

warning: javax\servlet\ServletContext.class(javax\servlet:ServletContext.class): major version 51 is newer than 50, the highest major version supported by this compiler.

It is recommended that the compiler be upgraded.

warning: javax\servlet\ServletException.class(javax\servlet:ServletException.class): major version 51 is newer than 50, the highest major version supported by this compiler.

It is recommended that the compiler be upgraded.

warning: javax\servlet\ServletRequest.class(javax\servlet:ServletRequest.class): major version 51 is newer than 50, the highest major version supported by this compiler.

It is recommended that the compiler be upgraded.

warning: javax\servlet\ServletResponse.class(javax\servlet:ServletResponse.class): major version 51 is newer than 50, the highest major version supported by this compiler.

It is recommended that the compiler be upgraded.


```



### Problem (문제)


JDK1.7을 지원하는 클래스가 존재하는데,


`JDK1.6 환경`에서 `컴파일(Compile)`하여 경고를 하는 것이다.




### Solved (해결)


나의 경우에는 JDK1.6환경을 기준으로 컴파일하는 것이 목표였기 때문에, 


경고가 뜬 `javax.servlet를 다운그레이드(Down Grade)`하였다.


3.1 => 2.4


Gradle(그래들)로 예를 들면 다음과 같다.


#### 1. Gradle Depedencies설정 (build.gradle)


BEFORE


```gradle

providedCompile  group: 'javax.servlet', name: 'javax.servlet-api', version: '3.1.0'

```


AFTER


```gradle

providedCompile  group: 'javax.servlet', name: 'servlet-api', version: '2.4'

```


#### 2. War Build


```bash

$ gradle clean war

```