我在我的mac上安裝了Eclipse SDK 3.7.1,它運行的是mac osx 10.8.4。 我試圖讓eclipse使用java 7,它安裝到/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/ 但是當我查看eclipse的安裝細節時,它仍然使用我的舊java 6安裝。 即使在eclipse.ini文件中添加了 -vm /Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/bin/java 。Eclipse仍然在Mac OSX上使用java 6作爲jre
還編輯了Info.plist文件指向Java 7的
人有什麼建議嗎?我完全沒有想法。
請注意:我是帶Mac電腦的新手。任何建議,或大或小,將不勝感激:)
的Info.plist的
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
<string>eclipse</string>
<key>CFBundleGetInfoString</key>
<string>Eclipse 3.7 for Mac OS X, Copyright IBM Corp. and others 2002, 2011. All rights reserved.</string>
<key>CFBundleIconFile</key>
<string>Eclipse.icns</string>
<key>CFBundleIdentifier</key>
<string>org.eclipse.eclipse</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Eclipse</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>3.7</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>3.7</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleLocalizations</key>
<array>
<string>ar</string>
<string>cs</string>
<string>da</string>
<string>el</string>
<string>en</string>
<string>es</string>
<string>de</string>
<string>fi</string>
<string>fr</string>
<string>hu</string>
<string>it</string>
<string>iw</string>
<string>ja</string>
<string>ko</string>
<string>nl</string>
<string>no</string>
<string>pl</string>
<string>pt_BR</string>
<string>pt</string>
<string>ru</string>
<string>sv</string>
<string>tr</string>
<string>zh_HK</string>
<string>zh_TW</string>
<string>zh</string>
</array>
<key>Eclipse</key>
<array>
<string>-vm</string><string>/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/bin/java</string>
<string>-keyring</string><string>~/.eclipse_keyring</string>
<string>-showlocation</string>
<!-- WARNING:
If you try to add a single VM argument (-vmargs) here,
*all* vmargs specified in eclipse.ini will be ignored.
We recommend to add all arguments in eclipse.ini
-->
</array>
</dict>
</plist>
http://stackoverflow.com/questions/7861424/how-to-change-workspace-jre-in-eclipse – kosa
我沒有試過大約一年前成功這樣做。事情現在可能有所不同,但我已經放棄了。我並不真正需要的Eclipse是用Java 7運行反正,只要支持Java 7個項目。 這裏是一個可以解決您的問題的答案 - http://stackoverflow.com/questions/10352715/how-do-i-run-eclipse-using-oracles-new-1-7-jdk-for-the-mac/10374886#10374886 –
確保您使用的是64位的Eclipse。沒有運氣在1.7 jvm上運行32bit的任何選項。 – tuxSlayer