title: How to install the latest openjdk 12 on Ubuntu 18.04
body: <p>I've installed the default jdk by issuing the command:</p>
  
  <pre><code>apt-get install default-jdk
  </code></pre>
  
  <p>This will install openjdk 11 and apt-get seems to install the files all over the place. Examples:</p>
  
  <pre><code>/etc/java-11-openjdk/management
  /usr/lib/jvm/java-11-openjdk-amd64/lib
  /usr/share/doc/openjdk-11-jre-headless/JAVA_HOME
  /var/lib/dpkg/info/openjdk-11-jre:amd64.postinst
  </code></pre>
  
  <p>As you can see by the example locations above, there are files scattered everywhere.</p>
  
  <p>I've just installed a web app that's giving a warning that it only supports jdk 12 (I think it's the latest openjdk version). How can I install version 12 so that it replaces version 11? What is the best way to upgrade the openjdk version on Ubuntu 18.04 so that it doesn't mingle with the previous version?</p>