Eclipse 4.2,Mac OS X 10.8(ML)和Java 6 [英] Eclipse 4.2, Mac OS X 10.8 (ML), and Java 6
问题描述
我正在Mac OS X 10.8(Mountain Lion)上运行Eclipse 4.2(最新的网站:eclipse-SDK-4.2-macosx-cocoa-x86_64)。
我已经安装了Java 7,但是我不断得到提示安装Java 6.当我选择通过点击Not Now来放弃安装时,Eclipse退出。
$ java -version
/ pre>
java版本1.7.0_05
Java(TM)SE运行时环境(build 1.7.0_05-b06)
Java HotSpot (TM)64位服务器虚拟机(构建23.1-b03,混合模式)
$ whereis java
/ usr / bin / java
有关如何让Eclipse使用最新版本的Java的任何想法? README没有任何有用的信息(甚至声称Eclipse在某些平台上使用Java 7进行了测试)。
更新:
运行sudo /Applications/.Eclipse/Eclipse.app/Contents/MacOS/eclipse
工作正常。在sudo下运行,然后用/Applications/.Eclipse/Eclipse.app/Contents/MacOS/eclipse
切换回来,导致锁文件错误(权限被拒绝)
看来我有两个问题:
-
图标点击需要Java 6的结果
-
从命令行运行导致权限被拒绝
更新:从Cupertino看来更多的垃圾:
Apple Radar:12082976
这是Apple想从世界隐藏的文字:
我购买了新的Mac Book Pro。我立即升格为山狮。我从Sun [Oracle]安装了Java 7:
$ java -version
java版本1.7.0_05
Java(TM)SE运行时环境(构建1.7.0_05-b06)
Java HotSpot(TM)64位服务器虚拟机(构建23.1-b03,混合模式)
$ whereis java
/ usr / bin / java
$ / usr / libexec / java_home
/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents / home
当我尝试运行Java Preferences(in / Applications / Utilities)和Eclipse时,我会收到提示安装Java(见附件)。
这个过时的文章没有帮助(添加environment.plist): https://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/EnvironmentVars.html 。我认为问题可能是$ JAVA_HOME没有设置,但我错了。
我认为我从Stack Overflow而不是供应商(Apple)获得更多有用的信息,但它还没有解决。 https://apple.stackexchange.com/questions/58203/mountain-lion- with-java-7-only 和 https://apple.stackexchange.com/questions/57986/multiple-java-versions-support-on-os-x-and-java-home-location 。
请修复此问题。我在苹果硬件上花了数千美元,在苹果软件上花了数百美元,而这种事情是不能接受的。像其他人一样,我个人浪费了这个问题的时间。苹果QA部门如何想念另一个漏洞?
从 请注意,上述问题中的OP专门讨论了Eclipse不工作与Java 7。 另外 此 可能值得阅读。 I'm trying to run Eclipse 4.2 (latest from website: eclipse-SDK-4.2-macosx-cocoa-x86_64) on Mac OS X 10.8 (Mountain Lion). I have Java 7 installed, but I keep getting prompted to install Java 6. When I choose to forgo the install by clicking "Not Now", Eclipse exits. Any ideas on how to get Eclipse to work with the latest version of Java? README is lacking any useful information (and even claims Eclipse was tested with Java 7 on some platforms). UPDATE:
Running It appears I have two problems: Running through icon click results in "Need Java 6" Running from command line results in "Permission Denied" UPDATE: It appears to be more junk from Cupertino: Apple Radar: 12082976 Here's the text that Apple wants to hide from the world: I purchased a new Mac Book Pro. I immediately upgraded to Mountain Lion. I installed Java 7 from Sun [Oracle]: $ java -version
java version "1.7.0_05"
Java(TM) SE Runtime Environment (build 1.7.0_05-b06)
Java HotSpot(TM) 64-Bit Server VM (build 23.1-b03, mixed mode) $ whereis java
/usr/bin/java $ /usr/libexec/java_home
/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home When I attempt to run the Java Preferences (in /Applications/Utilities) and Eclipse, I get prompted to install Java (see attachment). This outdated article was no help (adding environment.plist): https://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/EnvironmentVars.html. I thought the problem might be $JAVA_HOME was not set, but I was wrong. I think I got more useful information from Stack Overflow rather than the vendor (Apple), but its still not solved. https://apple.stackexchange.com/questions/58203/mountain-lion-with-java-7-only and https://apple.stackexchange.com/questions/57986/multiple-java-versions-support-on-os-x-and-java-home-location. Please fix this. I spends thousands on Apple hardware and hundreds on Apple software, and this sort of thing is not acceptable. I have personally wasted hours on this issue, as have others. How can the Apple QA department miss another gapping hole? From here. Note that the OP in the above question specifically talks about Eclipse not working with Java 7. Also this might be worthwhile read. 这篇关于Eclipse 4.2,Mac OS X 10.8(ML)和Java 6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!。
JDK 7将安装在/Library/Java/JavaVirtualMachines/1.7.0.jdk,JDK 6 / System / Library / Java / JavaVirtualMachines下。
为了让OS X接受Java 7而不是提议安装Java 6,一个简单的符号链接就足够了:
sudo mkdir / System / Library / Java / JavaVirtualMachines
sudo su ln -s /Library/Java/JavaVirtualMachines/1.7.0.jdk /System/Library/Java/JavaVirtualMachines/1.6.0.jdk
大多数Java程序将运行这个小黑客没有需要安装Java 6.
$ java -version
java version "1.7.0_05"
Java(TM) SE Runtime Environment (build 1.7.0_05-b06)
Java HotSpot(TM) 64-Bit Server VM (build 23.1-b03, mixed mode)
$ whereis java
/usr/bin/java
sudo /Applications/.Eclipse/Eclipse.app/Contents/MacOS/eclipse
works fine. After running under sudo and then switching back to lowly me with /Applications/.Eclipse/Eclipse.app/Contents/MacOS/eclipse
results in a lock file error (permission denied).
JDK 7 will be installed under /Library/Java/JavaVirtualMachines/1.7.0.jdk, JDK 6 under /System/Library/Java/JavaVirtualMachines.
To trick OS X to accept Java 7 instead of proposing to install Java 6 a simple symlink is enough:
sudo mkdir /System/Library/Java/JavaVirtualMachines
sudo su ln -s /Library/Java/JavaVirtualMachines/1.7.0.jdk /System/Library/Java/JavaVirtualMachines/1.6.0.jdk
Most Java Programms will run with this little hack without the need to install Java 6.