title: build openjdk on mac "JAVA_HOME is not defined correctly"
body: <p>I am building openjdk on MAC and facing a problem like this:</p>
  
  <pre><code>Error: JAVA_HOME is not defined correctly.
  We cannot execute /NO_BOOTDIR/bin/java
  </code></pre>
  
  <p>the OS of my mac is 10.10.2.</p>
  
  <p>the openjdk is </p>
  
  <pre><code>openjdk-7u40-fcs-src-b43-26_aug_2013
  </code></pre>
  
  <p>the ALT_BOOTDIR</p>
  
  <pre><code>export ALT_BOOTDIR=/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home
  </code></pre>
  
  <p>the $JAVA_HOME</p>
  
  <pre><code>echo $JAVA_HOME
  /Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home
  </code></pre>
  
  <p>when I set JAVA_HOME and run 'make sanity', the error is like this:</p>
  
  <pre><code>ERROR: Your JAVA_HOME environment variable is set.  This will
     most likely cause the build to fail.  Please unset it
     and start your build again.
  </code></pre>
  
  <p>so I have to unset it and no matter I unset it or not, the error appears.</p>
  
  <p>any ideas?</p>
  
  <p>thinks.</p>