Next, set the variable edit the /etc/environment: sudo nano /etc/environmentĪdd the following line, at the end of the file: JAVA_HOME="/usr/lib/jvm/java-17-openjdk-amd64/" You can use the update-alternatives command: sudo update-alternatives -list java To set the JAVA_HOME environment variable, you first need to find the default install location of JAVA. Press to keep the current choice, or type selection number: * 0 /usr/lib/jvm/java-17-openjdk-amd64/bin/java 1711 auto modeġ /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 manual modeĢ /usr/lib/jvm/java-17-openjdk-amd64/jre/bin/java 171 manual mode Output: There are 2 choices for the alternative java (providing /usr/bin/java). You can have multiple versions of Java on your system, they can easily be managed by using the command: sudo update-alternatives -config java You can verify the installation of Java 11 by running the command below: To install the default JRE (Java Runtime Environment) on your system, run: sudo apt install openjdk-17-jre openjdk-17-jdk Install Latest Java (OpenJDK 17) on Debian 11.To install the default JDK (Java Development Kit) on your system, run: sudo apt install default-jre default-jdk Before we install any software, it’s important to make sure your system is up to date by running the following apt commands in the terminal: sudo apt update We recommend acting as a non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root. A non-root sudo useror access to the root user.It’s recommended that you use a fresh OS install to prevent any potential issues. A server running one of the following operating systems: Debian 11 (Bullseye).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |