title: JAVA_HOME error when using cordova
body: <p>hey i am trying to run <code>cordova run android</code> and got this error :</p>
  
  <pre><code>ANDROID_HOME=/home/ronin/Android
  JAVA_HOME=/home/ronin/jdk1.8.0_161/
  (node:7717) UnhandledPromiseRejectionWarning: CordovaError: Requirements check failed for JDK 1.8 or greater
      at /home/ronin/Downloads/SyncApp/platforms/android/cordova/lib/check_reqs.js:367:19
      at _fulfilled (/home/ronin/Downloads/SyncApp/platforms/android/cordova/node_modules/q/q.js:854:54)
  </code></pre>
  
  <p>clearly my <code>JAVA_HOME</code> variable is correctly set ( i get the same error without <code>/</code> in the end);
  i am running Arch Linux and i know it uses, bu default, the <code>openjdk</code> versions. is that the source of the error cause this is what i get when i run <code>java -version</code></p>
  
  <pre><code>openjdk version "9.0.4"
  OpenJDK Runtime Environment (build 9.0.4+11)
  OpenJDK 64-Bit Server VM (build 9.0.4+11, mixed mode)
  </code></pre>
  
  <p>help !</p>