Java 应用程序未在 OS X Yosemite 上运行 [英] Java Application not running on OS X Yosemite

查看:77
本文介绍了Java 应用程序未在 OS X Yosemite 上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

安装 OS X Yosemite 后,我的一个 Java 应用程序停止运行.消息是我需要 JAVA SE 6 Runtime.与 Eclipse Kepler for OS X Mavericks 请求 Java SE 完全一样6

After installing OS X Yosemite, one of my Java Applications stopped running. The message was that I needed JAVA SE 6 Runtime. Exactly as in Eclipse Kepler for OS X Mavericks request Java SE 6

我按照用户 Nikolas 的建议做了,显然与用户 Sage 评论的问题相同:

I did as user Nikolas suggested and apparently had the same problem as user Sage commented:

最初,这给了我 Eclipse 错误 Failed to create the Java Virtual Machine,但那是因为我的 /usr/bin/java 符号链接到另一个 1.7 (/Library/Internet/... 插件之一,而不是/Library/Java... 一个).修复该链接后,这对我来说效果很好 - 我希望我能投两票!– 圣人 2013 年 12 月 28 日 0:43

Initially, this gave me the Eclipse error Failed to create the Java Virtual Machine, but that was because my /usr/bin/java was symlinked to another 1.7 (the /Library/Internet/... plugins one instead of the /Library/Java... one). After fixing that link, this works beautifully for me - I wish I could give two upvotes! – sage Dec 28 '13 at 0:43 "

这是终端在尝试运行后所说的:

This is what Terminal says after trying to run it:

JavaVM: Failed to load JVM: /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bundle/Libraries/libserver.dylib
JavaVM: Failed to load JVM: /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bundle/Libraries/libserver.dylib
JavaVM FATAL: Failed to load the jvm library.
[JavaAppLauncher Error] JNI_CreateJavaVM() failed, error: -1
logout

[Process completed]

有人可以建议我如何解决这个问题吗?

Anyone can advice me on how to go around this issue?

推荐答案

根据 此处,El Capitan 有更新.在这里有效的更新解决方案是:

As per here, there's an update for El Capitan. The updated solution, that worked here, would be:

$ sudo mkdir -p /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/bundle/Libraries
Password:
$ sudo ln -s /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/jre/lib/server/libjvm.dylib /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/bundle/Libraries/libserver.dylib

这篇关于Java 应用程序未在 OS X Yosemite 上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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