原地址
、解决办法:
1. java -version 看显示的JDK版本
2.path查看所有的路径设置(可以在所有路径中使用java关键词进行搜索),如:本人IBM笔记本,自动安装jdk1.4,c:\Windows\system32下有java.exe等命令。在控制面板:删除和添加程序中找到并删除即可。
3. 查看注册表,修改注册表HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft下的关于1.4的jre和jvm的路径信息改为1.5的jdk的即可。
英文介绍(转载):
Each java class has a version stamp, older versions have lower numbers. The JVM is backward compatible, so older classes also run in a newer JVM. Version ranges are as follows:
Java 1.1 platform: 45.3-45.65535
Java 1.2 platform: 45.3-46.0
Java 1.3 platform: 45.3-47.0
Java 1.4 platform: 45.3-48.0
Java 5 class files are stamped with 49.0, and the JVM is also backward compatible. So, a 1.3 class file will run in a 1.5 JVM, but not the other way round. That's the reason for the original problem. None of us would be able to run Struts in an 1.4 or 1.5 JVM if it were otherwise, as the binaries are 1.3 versions, IIRC. Apart from that, Sun has been very careful when it comes to JVM version compatibility, much more than in other parts,
Serialization would be a prominent example here. IIRC there were no changes to the class format in 1.2 and 1.3, possibly including 1.1 even. The changes made in 1.5 were mostly required by the extended type system (Generics | 'type erasure'). Another aspect of backward compatibility is the usage of features in the Foundation Classes; this lib has steadily grown over the years. If a class files has dependencies on other
classes only available in a more recent version, trying to do so will end up in a ClassNotFound exception, but thats just what is to be expected. An example for that would be Tomcat 5.5: normally, it requires Java 5, but you can install a compatibility package that provides the missing features and makes it run in a 1.4 setup.
分享到:
相关推荐
这里我们讨论的焦点是“JDK1.5环境下编译的jar包在JDK1.4环境下运行”所遇到的问题,具体表现为“Unsupported major.minor version 49.0”的错误。这个错误的根源在于Java字节码版本不兼容。Java字节码版本与JDK版本...
在使用JUnit/StrutsTest时,可能会遇到java.lang.UnsupportedClassVersionError: junit/framework/TestListener (Unsupported major.minor version 49.0)错误。 解决方法:根据JDK版本选择合适的JUnit版本。如果...
其次,如果选择J2EE 1.3进行开发,可能会遇到“Unsupported major.minor version 49.0”的错误,这是由于WebLogic 8不支持JDK 1.5导致的。为了解决这个问题,你可以选择使用JDK 1.4重新编译项目,或者升级WebLogic到...
- WebLogic 8不支持JDK 1.5,因此如果使用JDK 1.5编译的程序尝试部署到WebLogic 8上,会遇到"Unsupported major.minor version 49.0"的错误。解决方案是使用JDK 1.4重新编译代码,或者升级WebLogic到支持JDK 1.5的...
Unsupported major.minor version 49.0 ``` **错误原因:** 此错误表明Java运行环境与编译时的Java版本不兼容,通常是由于以下原因导致: 1. **编译时使用了较高版本的Java SDK,但运行环境只支持较低版本。** 2....
WebLogic 8不支持JDK 1.5,这意味着使用JDK 1.5编译的程序在WebLogic 8上运行时会报"Unsupported major.minor version 49.0"错误。解决此问题的方法是使用JDK 1.4重新编译代码,或者升级WebLogic到9.2版,因为...
2. **JDK版本问题**:WebLogic 8不支持JDK 1.5,这意味着使用JDK 1.5编译的程序无法在WebLogic 8上部署,会报错“Unsupported major.minor version 49.0”。解决方法是要么使用JDK 1.4重新编译,要么升级WebLogic到...
如果使用JDK 1.5编译的程序部署到WebLogic 8,会遇到“Unsupported major.minor version 49.0”的错误。为了解决这个问题,我们需要使用支持JDK 1.5的WebLogic 9.2版本。 #### 四、配置WebLogic 9.2 ##### 安装...