How To Install Java with Apt on Debian 11
In this guide, you will install different versions of the Java Runtime Environment (JRE) and the Java Developer Kit (JDK) using Apt. You’ll install OpenJDK as well as the official JDK from Oracle. Then, you’ll select the version you wish to use for your projects. When you’re finished, you’ll be able to use the JDK to develop software or use the Java Runtime to run software.