title: how to upgrade my MAC OS X to use newer Java compiler?
body: <p>This is probably an easy question, but I could not find a clear answer to it by searching on stack overflow. I will delete this thread if its a duplicate. I am on a OS X Yosemite version 10.10.5, and my System.Preferences->java-> general shows that I have version 8 update 66 (build 1.8.0_66-b17). However some code fails due to use of old java compiler.</p>
  
  <pre><code>$javac -version (javac 1.6.0_65)
  java -version
  java version "1.6.0_65"
  Java(TM) SE Runtime Environment (build 1.6.0_65-b14-466.1-11M4716)
  Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-466.1, mixed mode)
  </code></pre>
  
  <p>How can I let my projects use the newest java compiler? (preferably as a systems default)?</p>