线程“main”中的异常java.lang.UnsupportedClassVersionError:danbikel / parser / Trainer(不支持的major.minor版本50.0) [英] Exception in thread "main" java.lang.UnsupportedClassVersionError: danbikel/parser/Trainer (Unsupported major.minor version 50.0)

查看:104
本文介绍了线程“main”中的异常java.lang.UnsupportedClassVersionError:danbikel / parser / Trainer(不支持的major.minor版本50.0)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试运行一个用Java构建的解析器,但每次我尝试使用该类时,我都会收到上述错误(线程中的异常主java.lang.UnsupportedClassVersionError:danbikel / parser / Trainer(不支持的major.minor版本50.0))。

I'm trying to run a parser built in Java, but every time I try to use the class, I get the above error ("Exception in thread "main" java.lang.UnsupportedClassVersionError: danbikel/parser/Trainer (Unsupported major.minor version 50.0)").

从我所读到的,这可能是用于编译和运行的Java版本之间不匹配的问题代码;但我确保我的JAVA_HOME环境设置为1.6版本,这是解析器安装指南推荐的版本。

From what I've read, this may be a problem with a mismatch between the versions of Java used to compile and run the code; but I've made sure that my JAVA_HOME environment is set to version 1.6, which is the version recommended by the parser's installation guide.

安装了旧版本的Java服务器,但我无能为力。我还能做些什么来解决这个错误吗?

There are older versions of Java installed on the server, but I can't do anything about that. Is there anything else I can do about this error?

推荐答案

使用 sudo update-alternatives --config java 并设置您可能想要使用的版本,如果您使用的是Debian派生的发行版(例如Ubuntu)。

Use sudo update-alternatives --config java and set the version you may want to use if you are using a Debian-derived distro (such as Ubuntu).

这篇关于线程“main”中的异常java.lang.UnsupportedClassVersionError:danbikel / parser / Trainer(不支持的major.minor版本50.0)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆