title: Eclipse in OS X uses different version of Java than CLI
body: <p>When I type <code>java -version</code> in the console I get <code>java version "1.8.0_05"</code>. The soft link <code>/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK</code> points to <code>/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents</code>. In the java preferences window, the only listed version of Java is 1.8. JAVA_HOME is set to <code>/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home</code>.</p>
  
  <p>However, when I try to run Eclipse.app, I get the error: <code>Version 1.6.0_65 of the JVM is not suitable for this product. Version: 1.7 or greater required.</code></p>
  
  <p>I believe it is trying to use <code>/System/Library/Java/JavaVirtualMachines</code> and in that directory the only version is <code>1.6.0.jdk</code>.</p>
  
  <p>How can I get eclipse to use the correct version of Java?</p>