title: Maven "JAVA_HOME should point to a JDK not a JRE"
body: <p>I had the following command working fine with OpenJDK</p>
  
  <pre><code>mvn clean install
  </code></pre>
  
  <p>I then uninstalled OpenJDK and installed Oracle JDK 8, and now when I run <code>mvn clean install</code></p>
  
  <blockquote>
    <p>The JAVA_HOME environment variable is not defined correctly This
    environment variable is needed to run this program NB: JAVA_HOME
    should point to a JDK not a JRE</p>
  </blockquote>
  
  <p>I'm running Linux Mint 19, I did run into a few Stackoverflow questions related to the issue. Most where related to Windows and some that were related to Linux. The Linux ones recommended to run</p>
  
  <p><code>sudo update-alternatives --config java</code></p>
  
  <p>but in my case I get </p>
  
  <blockquote>
    <p>There is only one alternative in link group java (providing
    /usr/bin/java): /usr/lib/jvm/java-8-oracle/jre/bin/java Nothing to
    configure.</p>
  </blockquote>
  
  <p>Any idea how I can make <code>mvn clean install</code> work again?</p>