WebSphere Application Server V7 确实支持Java Platform, Standard Edition (Java SE) 6(请参阅网络部署(所有操作系统)版本 7.0 信息中心中的规范和 API 文档),并且它是自发布 V8.5 以来的 Java 7支持。
我找不到 Java 6 SDK 文档,只能查阅Java 7 Windows 文档中的IBM JVM Messages。唉,我在文档中也找不到错误消息。
因为java.lang.UnsupportedClassVersionError是“当 Java 虚拟机尝试读取类文件并确定文件中的主要和次要版本号不受支持时抛出。” ,您遇到了使用比运行时环境(即 WebSphere Application Server 7.0)支持的版本更新的 Java 版本构建应用程序的问题。
我可能记错了,但我认为消息中的offset=6是为了让您知道是什么位置导致了不兼容问题的发生。它对你、我和许多其他人都无关紧要,但有些人可能会觉得它很有用,尤其是。当他们自己生成字节码时。
运行versionInfo命令以了解 WebSphere Application Server V7 的已安装特性,例如
C:\IBM\WebSphere\AppServer>.\bin\versionInfo.bat
WVER0010I: Copyright (c) IBM Corporation 2002, 2005, 2008; All rights reserved.
WVER0012I: VersionInfo reporter version 1.15.1.47, dated 10/18/11
--------------------------------------------------------------------------------
IBM WebSphere Product Installation Status Report
--------------------------------------------------------------------------------
Report at date and time February 19, 2013 8:07:20 AM EST
Installation
--------------------------------------------------------------------------------
Product Directory C:\IBM\WebSphere\AppServer
Version Directory C:\IBM\WebSphere\AppServer\properties\version
DTD Directory C:\IBM\WebSphere\AppServer\properties\version\dtd
Log Directory C:\ProgramData\IBM\Installation Manager\logs
Product List
--------------------------------------------------------------------------------
BPMPC installed
ND installed
WBM installed
Installed Product
--------------------------------------------------------------------------------
Name IBM Business Process Manager Advanced V8.0
Version 8.0.1.0
ID BPMPC
Build Level 20121102-1733
Build Date 11/2/12
Package com.ibm.bpm.ADV.V80_8.0.1000.20121102_2136
Architecture x86-64 (64 bit)
Installed Features Non-production
Business Process Manager Advanced - Client (always installed)
Optional Languages German
Russian
Korean
Brazilian Portuguese
Italian
French
Hungarian
Simplified Chinese
Spanish
Czech
Traditional Chinese
Japanese
Polish
Romanian
Installed Product
--------------------------------------------------------------------------------
Name IBM WebSphere Application Server Network Deployment
Version 8.0.0.5
ID ND
Build Level cf051243.01
Build Date 10/22/12
Package com.ibm.websphere.ND.v80_8.0.5.20121022_1902
Architecture x86-64 (64 bit)
Installed Features IBM 64-bit SDK for Java, Version 6
EJBDeploy tool for pre-EJB 3.0 modules
Embeddable EJB container
Sample applications
Stand-alone thin clients and resource adapters
Optional Languages German
Russian
Korean
Brazilian Portuguese
Italian
French
Hungarian
Simplified Chinese
Spanish
Czech
Traditional Chinese
Japanese
Polish
Romanian
Installed Product
--------------------------------------------------------------------------------
Name IBM Business Monitor
Version 8.0.1.0
ID WBM
Build Level 20121102-1733
Build Date 11/2/12
Package com.ibm.websphere.MON.V80_8.0.1000.20121102_2222
Architecture x86-64 (64 bit)
Optional Languages German
Russian
Korean
Brazilian Portuguese
Italian
French
Hungarian
Simplified Chinese
Spanish
Czech
Traditional Chinese
Japanese
Polish
Romanian
--------------------------------------------------------------------------------
End Installation Status Report
--------------------------------------------------------------------------------