类文件有错误的版本52.0,应该是50.0 [英] Class file has wrong version 52.0, should be 50.0
问题描述
我正在尝试使用IntelliJ构思编译我的项目。我正在外部jar文件中使用一个类,并在编译时收到上述错误。
I'm trying to compile my project in IntelliJ idea. I'm using a class in an external jar file and on compilation receiving the above error.
我知道它说的是jar文件是用比Java更新的版本编译的。 IntelliJ正在使用的。我的问题是如何使它们兼容?我已将Mac上的Java更新为1.8,当我运行 java -version
或 javac -version
时,它确认了这一点。
I understand that it's saying the jar file was compiled with a newer Java version than that which IntelliJ is using. My question is how do I make them compatible? I have updated the Java on my Mac to 1.8 and when I run java -version
or javac -version
it confirms this.
我错过了什么? (除了Java开发经验)
What am I missing? (Apart from Java development experience)
推荐答案
选择文件 - >项目结构。
Select "File" -> "Project Structure".
在项目设置下选择项目
从那里你可以选择Project SDK。
From there you can select the "Project SDK".
这篇关于类文件有错误的版本52.0,应该是50.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!