类已由更新版本的Java环境编译 [英] Class has been compiled by a more recent version of the Java Environment
问题描述
在运行selenium脚本时,我在Eclipse控制台中收到以下错误消息:
While running selenium script, I am getting the following error message in Eclipse console:
类已被更新版本编译在Java环境(类文件版本53.0)中,此版本的Java Runtime仅识别最高为52.0的类文件版本。
Class has been compiled by a more recent version of the Java Environment (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0.
Java版本:8
IDE:Eclipse Oxygen
Firefox版本:46
Java Version: 8
IDE: Eclipse Oxygen
Firefox Version: 46
推荐答案
这只是一个版本不匹配。您已使用Java版本9编译代码,并且当前的JRE是版本8.尝试将JRE升级到9,因为它是最合理的选择。
This is just a version mismatch. You have compiled your code using java version 9 and your current JRE is version 8. Try upgrading your JRE to 9, since it is the most logical choice.
这篇关于类已由更新版本的Java环境编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!