title: Change java version (Mac)
body: <p>I have 2 java versions on my computer:</p>
  
  <pre><code>/Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home
  /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
  </code></pre>
  
  <p>The 1.6.0 is set to default. How can I make my java programs to run 1.7?</p>
  
  <p>Tried to add:</p>
  
  <pre><code>export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home
  </code></pre>
  
  <p>to my <em>.zshrc</em> file. But this seems to only change the path for my terminals <code>java</code> command.</p>
  
  <p>Also tried to change the HOME symlink like this:</p>
  
  <pre><code>cd /Library/Java
  mv Home Home-1.6
  ln -s /Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/ Home
  </code></pre>
  
  <p>This had no effect at all.</p>
  
  <p>Also tried java changer software:
  <a href="http://www.guigarage.com/2013/02/change-java-version-on-mac-os/" rel="noreferrer">http://www.guigarage.com/2013/02/change-java-version-on-mac-os/</a>
  But no effect.</p>
  
  <p>Any idea how to start java programs like .app and .jar files with the 1.7 version by just clicking on them?</p>