2012-02-22 3 views
3

입니다. 이상한 문제가 있습니다. 나는 자바 5. 그WAS 6.1은 Java 버전 5를 표시하지만 실제로는 1.4

System.getProperty("java.version") 
System.getProperty("java.specification.version") 
System.getProperty("java.vm.name") 

내가

를 얻을 JSP 페이지 인쇄에 나는 경우에 나는 자바 4.

에서 마이그레이션 한 정말 오래된 응용 프로그램을 실행하기 위해 WebSphere Application Server를 구성한

Java 버전 : 1.5.0
java.specification.version : 1.5
java.vm.name : IBM J9 VM

그러나, List에서 나는 다음과 같은 예외가 얻을 List<Object>에 코드를 변경 JSP i를의 경우 :

The type ArrayList is not generic; it cannot be parameterized with arguments <Object> JSPG0091E: An error occurred at line: 79 in the file: /jsp/archive/archiveoverview.jsp JSPG0093E: Generated servlet error from file: /jsp/archive/archiveoverview.jsp C:\SDP75\runtimes\base_v61\profiles\was61profile1\temp\CR122599Node01\server1\myifEAR\myif.war\jsp\archive\_archiveoverview.java : 199 : Syntax error, parameterized types are only available if source level is 5.0

방법이 될 수 있습니다 ???

+3

이 도움이 될 수 있습니다 - http://stackoverflow.com/questions/2036544/why-websphere-6-1-jdk-1-5-compliant-compiles-my-jsps-as-jdk-1-4. – Perception

+2

Websphere 6.1은 J2EE 1.4 컨테이너이지만 JDK 1.5에서 실행 중입니다 ... – mglauche

+0

감사합니다. 이 스레드를 닫으려는 것이 좋습니다. –

답변

5

WebSphere Application Server를 실행하는 데 사용되는 JVM은 서버 내에서 실행되는 JSP를 컴파일하는 데 사용되는 컴파일러 준수 레벨과 다릅니다. 이 기술 자료 참조 : Using Java 5 language feature in a JSP targeting WebSphere Application Server v6.1.

+0

비록 이것이 이것이 복제 된 것이라고 생각하지만, 이것이 정확히 내가 한 일이므로 받아 들일 것입니다. –