Java 8:JavaLaunchHelper 类在两者中都实现
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/23590613/
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
Java 8: Class JavaLaunchHelper is implemented in both
提问by user3181113
I'm trying to launch Cassandra and I'm running into an issue with JavaLaunchHelper being located in two places. I'm running Java 8. Here's the exact error:
我正在尝试启动 Cassandra,但遇到了 JavaLaunchHelper 位于两个地方的问题。我正在运行 Java 8。这是确切的错误:
objc[413]: Class JavaLaunchHelper is implemented in both
/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/bin/java and
/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/libinstrument.dylib.
One of the two will be used. Which one is undefined.
Found a similar question for Java 7:
为 Java 7 找到了一个类似的问题:
Class JavaLaunchHelper is implemented in both. One of the two will be used. Which one is undefined
JavaLaunchHelper 类在两者中都实现了。将使用两者之一。哪个是未定义的
What's the best way to go about solving this?
解决这个问题的最佳方法是什么?
回答by Zanson
Shouldn't be a problem, just an annoying message. But Cassandra hasn't been verified against java 8 yet, so you may see some strangeness.
应该没有问题,只是一个烦人的消息。但是 Cassandra 尚未针对 Java 8 进行验证,因此您可能会看到一些奇怪之处。
回答by J.R. Garcia
回答by Andrey
put lines to files ~/.bashrc (or/and ~/.zshrc) and save
将行放入文件 ~/.bashrc (或/和 ~/.zshrc)并保存
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home
export PATH=$JAVA_HOME/bin:$PATH
and then restart (logout/login) terminal (IDE)
然后重新启动(注销/登录)终端(IDE)
回答by David Figueroa
You must go to Preferences/Build, Execution, Deployment/Debugger and disable the option: "Force Classic VM for JDK 1.3.x and earlier" This works for me
您必须转到 Preferences/Build、Execution、Deployment/Debugger 并禁用该选项:“Force Classic VM for JDK 1.3.x 及更早版本”这对我有用
回答by Charles He
Two steps fix this problem:
两步解决这个问题:
1.Navigate to /Library/Internet Plug-Ins
and remove the JavaAppletPlugin.plugin
directory.
1.导航到/Library/Internet Plug-Ins
并删除JavaAppletPlugin.plugin
目录。
2.Navigate to /Library/PreferencePanes
and remove JavaControlPanel.prefpane
.
2.导航到/Library/PreferencePanes
并删除JavaControlPanel.prefpane
。
Essentially, do one thing: uninstall jre !
本质上,做一件事:卸载 jre !