Life is Struggle

Eclipse on Mac OS X 10.9

MAC os upgrade 到 10.9 後, 因為沒有 jre, 所以 eclipse 開不起來 但下載 java 1.7 後, eclispe 居然說找不到 jre 1.6

解法如下

1
vi /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Info.plist

1
2
3
4
<key>JVMCapabilities</key>
 <array>
  <string>CommandLine</string> <!--這行換掉-->
 </array>

換成

1
2
3
4
5
6
7
8
9
10
<key>JVMCapabilities</key>
 <array>
  <!--換成以下五行-->
  <string>JNI</string>
  <string>BundledApp</string>
  <string>WebStart</string>
  <string>Applets</string>
  <string>CommandLine</string>
  <!--換成以上五行-->
 </array>

ref : http://stackoverflow.com/questions/19563766/eclipse-kepler-for-os-x-mavericks-request-java-se-6