When a new OpenJDK version that has no package installer is needed to be installed do the following (example is given for version 13):

  • Download tarball from here
  • Open a terminal window and there:
    • extract archive to the right place:
      sudo tar -xvf openjdk-13_linux-x64_bin.tar.gz -C /usr/lib/jvm/
    • create symbolic link:
      sudo ln -s /usr/lib/jvm/jdk-13 /usr/lib/jvm/java-1.13.0-openjdk-amd64
    • add java alternative:
      sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-1.13.0-openjdk-amd64/bin/java 1131

Version 13 should be active now. You can check the active java by issuing java -version. If you would like to switch to an other (previously installed) java just type: 

sudo update-alternatives --config java

With this command you can select java versions from list. Java applications started after will use the new java.