java 不受支持的主要次要版本 51.0,但我的 JRE 是最新的
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16003638/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
unsupported major minor version 51.0, but my JRE is up to date
提问by user2154283
I built a Java application in Eclipse on Windows 7. I have Mac OSX 10.7.4 on a VMWare machine.
我在 Windows 7 上的 Eclipse 中构建了一个 Java 应用程序。我在 VMWare 机器上安装了 Mac OSX 10.7.4。
I built the app with JDK 1.7. I have JRE 1.7 on my Windows and the app works fine. I have Java 1.7 installed on the Mac VM Machine.
我使用 JDK 1.7 构建了该应用程序。我的 Windows 上有 JRE 1.7,该应用程序运行良好。我在 Mac VM 上安装了 Java 1.7。
When launching the app on my Mac VM Machine, I get a "unspported major.minor version 51.0" error.
在我的 Mac VM 机器上启动应用程序时,我收到“unspported major.minor version 51.0”错误。
I know that this error means I don't have the right JRE to run my JAR file, but I do have JRE 7 installed (I installed it today).
我知道这个错误意味着我没有正确的 JRE 来运行我的 JAR 文件,但我确实安装了 JRE 7(我今天安装了它)。
My Application uses Apache FTP Client libraries but they are all included in the JAR file (I exported the Eclipse project into a Runnable JAR File, with all the required libraries).
我的应用程序使用 Apache FTP 客户端库,但它们都包含在 JAR 文件中(我将 Eclipse 项目导出到一个 Runnable JAR 文件中,其中包含所有必需的库)。
采纳答案by user2154283
The solution to this issue can be found on this post : Installed Java 7 on Mac OS X but Terminal is still using version 6.
此问题的解决方案可以在这篇文章中找到:在 Mac OS X 上安装了 Java 7 但终端仍在使用版本 6。
Thanks for everyone's help.
谢谢大家的帮助。