WAS 6.1显示了Java版本5,但它确实是1.4版本

She*_*ari 3 java websphere jsp websphere-6.1

我有一个奇怪的问题.

我已经将Websphere Application Server配置为运行Java 5.它是我从Java 4迁移的一个非常古老的应用程序.

如果我在jsp页面打印

System.getProperty("java.version")
System.getProperty("java.specification.version")
System.getProperty("java.vm.name")
Run Code Online (Sandbox Code Playgroud)

我明白了

Java版本:1.5.0
java.specification.version:1.5
java.vm.name:IBM J9 VM

但是,如果我在jsp中将代码更改ListList<Object>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

怎么会这样???

Bre*_*ail 5

用于运行WebSphere Application Server的JVM与用于编译在服务器中运行的JSP的编译器合规性级别不同.请参阅此技术说明:在面向WebSphere Application Server v6.1的JSP中使用Java 5语言功能.