title: Failed to find JAVA_HOME Linux Mint: Trying to use Cordova to build an Android App
body: <p>I am trying to build an Android app with Cordova. Every time I run the command: </p>
  
  <pre><code>$ sudo cordova build android
  </code></pre>
  
  <p>it shows:</p>
  
  <blockquote>
    <p>Error: Failed to find 'JAVA_HOME' environment variable. Try setting setting it manually.</p>
  </blockquote>
  
  <p>My .bashrc is:</p>
  
  <pre><code>export ANDROID_HOME=/home/eduarda/Android/Sdk
  export JAVA_HOME=/usr/lib/jvm/java-1.9.0-openjdk-amd64
  export PATH=${PATH}:${JAVA_HOME}/bin
  </code></pre>
  
  <p>More details:</p>
  
  <pre><code>$ which java
  /usr/bin/java
  
  $ java -version
  openjdk version "9-internal"
  OpenJDK Runtime Environment (build 9-internal+0-2016-04-14-195246.buildd.src)
  OpenJDK 64-Bit Server VM (build 9-internal+0-2016-04-14-195246.buildd.src, mixed mode)
  
  $ echo $JAVA_HOME
  /usr/lib/jvm/java-1.9.0-openjdk-amd64
  
  $ echo $PATH
  
  /home/eduarda/bin:/home/eduarda/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games://usr/lib/jvm/java-1.9.0-openjdk-amd64/bin
  </code></pre>
  
  <p>I don't know what to do, I think the error is with the java version, but I also don't know how to fix. </p>