title: PhoneGap/Cordova "javac -version" not found.
body: <p>I've updated my Mac to Yosimite. I've also installed JDK 1.8x. However, when I go <code>phonegap run android</code> I get the following:</p>
  
  <pre><code>[phonegap] detecting Android SDK environment...
  [phonegap] using the local environment
  [phonegap] adding the Android platform...
  
  /Users/profile/.cordova/lib/npm_cache/cordova-android/3.6.3/package/bin/node_modules/q/q.js:126
                      throw e;
                            ^
  Error: Failed to run "javac -version", make sure you have a Java JDK (not just a JRE) installed.
      at /Users/profile/.cordova/lib/npm_cache/cordova-android/3.6.3/package/bin/lib/check_reqs.js:43:27
      at ChildProcess.exithandler (child_process.js:641:7)
      at ChildProcess.EventEmitter.emit (events.js:98:17)
      at maybeClose (child_process.js:735:16)
      at Socket.&lt;anonymous&gt; (child_process.js:948:11)
      at Socket.EventEmitter.emit (events.js:95:17)
      at Pipe.close (net.js:466:12)
  { [Error: /Users/profile/.cordova/lib/npm_cache/cordova-android/3.6.3/package/bin/create: Command failed with exit code 8] code: 8 }
     [error] /Users/profile/.cordova/lib/npm_cache/cordova-android/3.6.3/package/bin/create: Command failed with exit code 8
  </code></pre>
  
  <p>I have setup my <code>$JAVA_HOME</code>, and when I do <code>javac -version</code> I get <code>javac 1.8.0_25</code>. Everything seems to be fine. </p>
  
  <p>The only thing which I can think of is phonegap is changing the path at run time</p>