I downloaded Java 11 in the form of OpenJDK from AdoptOpenJDK. From the tar.gz file I can extract a folder named jdk-11.0.3+7
with nested folders for bin
, conf
, lib
, and so on. But no installer app found there.
➥ How should I install this downloaded Java release onto Ubuntu?
I can cd
into the bin
folder and execute commands like ./java --version
. But I wonder if there is a usual routine for placing the Java implementation somewhere specific, and arranging environment variables, setting default path, etc. On macOS, an installer does all that for me automatically. As I newbie on Ubuntu, I'm uneducated.
Older Questions such as this one ask about using apt-get
. My Question is not a duplicate, as here I am asking about downloads from AdoptOpenJDK rather than via package-installer such as apt-get
.
AdoptOpenJDK is now superseeded by Adoptium
How to properly install Temurin JDK with update-alternatives
Adoptium provides a Debian / Ubuntu repository
AdoptOpenJDK provides a Debian / Ubuntu repository.
You can install using the package management system, which is much simpler than installing it manually.:
You can switch between e.g. OpenJDK, AdoptOpenJDK and Adoptium by using the following command.: