[英]java.lang.UnsupportedClassVersionError: Bad version number in .class file
I am getting the follwing error while running selenium testcase. 我在运行selenium testcase时遇到了以下错误。
java.lang.UnsupportedClassVersionError: Bad version number in .class file
I have checked all the versions of java in eclispse and they are correct. 我已经检查了eclispse中所有版本的java,它们是正确的。
Please it would be greatful if you can help me out. 如果你可以帮助我,那将是非常好的。
UnsupportedClassVersionError
occurs typically when you have .class (typically in .jar-file) that has been compiled with higher version of java than virtual machine trying to run it. 当您使用比使用更高版本的java编译的.class(通常在.jar文件中)而不是尝试运行它的虚拟机时,通常会发生UnsupportedClassVersionError
。 For example you have a .class-file that is compiled with JDK 6 and you are trying to run it with 1.4 JVM. 例如,您有一个使用JDK 6编译的.class文件,并且您尝试使用1.4 JVM运行它。
Check your PATH variable and test java -version
command etc. Also check this thread for couple typical issues that cause this problem. 检查您的PATH变量并测试java -version
命令等。另请检查此线程是否存在导致此问题的几个典型问题。
This error is due to mismatch in your Java Versions. 此错误是由于Java版本不匹配造成的。 Follow the following steps 请执行以下步骤
Now check again. 现在再次检查。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.