蚂蚁媒体服务器:线程"main"中的异常.java.lang.UnsupportedClassVersionError [英] Ant media server: Exception in thread "main" java.lang.UnsupportedClassVersionError
问题描述
我已经下载了ant媒体服务器的安装文件,现在我正在关注
运行java -version可以给我以下信息:
运行javac -version可以给我以下信息:
操作系统信息为:
知道发生什么事了吗?
我已尝试通过以下命令安装Java 8:
所以现在当我运行 java -version
时,我得到了:
但是,我仍然遇到相同的错误.
仅供参考,当我运行此命令时:
sudo update-alternatives --config java
这就是我得到的:
我选择了选项1.我已经为 javac
运行了相同的命令.
所以现在当我运行 java -version
时,我有了:
当我运行 javac -version
时,我得到了:
而且我仍然遇到相同的错误.
JAVA_HOME
环境变量也设置为:
JAVA_HOME =/usr/lib/jvm/java-8-oracle
错误告诉您该类是使用比您正在运行的版本更高的版本编译的.
您需要在Java 11(版本55)上运行它,但您正在使用Java 9(版本53).
I have downloaded the installation files of the ant media server and now I am following this tutorial to try to run the server.
So I've run this command:
./start.sh
But, I keep getting this error:
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/red5/server/Bootstrap has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 53.0
Here's the whole stack trace:
Running java -version gives me this:
Running javac -version gives me this:
The OS info is:
Any idea what's going-on?
I have tried installing java 8 by following the commands here:
So now when I run java -version
, I get this:
But, I still get the same error.
FYI, when I run this command:
sudo update-alternatives --config java
This is what I get:
I have selected option 1.
I have run the same commands for javac
.
So now when I run java -version
, I have this:
And when I run javac -version
, I have this:
And I am still getting the same error.
The JAVA_HOME
environment variable is also set to:
JAVA_HOME=/usr/lib/jvm/java-8-oracle
The error is telling you that the class was compiled with a newer version than the one you're running.
You need to run it with Java 11 (version 55) but you are using Java 9 (version 53).
这篇关于蚂蚁媒体服务器:线程"main"中的异常.java.lang.UnsupportedClassVersionError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!