我在运行 mac osx 10.8.4 的 mac 上安装了 Eclipse SDK 3.7.1。我试图让 eclipse 使用 java 7,它安装到 /Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/ 但是当我查看 eclipse 的安装详细信息时,它仍在使用我的旧 java 6 安装。即使在将 -vm /Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/bin/java 添加到 eclipse.ini 文件之后。
还编辑了 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>