Skip to content

Instantly share code, notes, and snippets.

@enspdf
Forked from IvanCl4udio/Java11_PopOS.markdown
Created September 22, 2022 20:19
Show Gist options
  • Save enspdf/f44b71d1b6eee8b09407458b73cc7084 to your computer and use it in GitHub Desktop.
Save enspdf/f44b71d1b6eee8b09407458b73cc7084 to your computer and use it in GitHub Desktop.
How install and config Java 11 on PopOS

How install and config Java 11 on PopOS

Introduction

PopOS is created from Ubuntu, so the configuration for Java environment can be follow the same way. We need only install the new version from the JDK and automatically it will be set as default. However, if you like rollback to previously version that was installed before, you can use the last step to do that.

Steps

Install the JDK 11

sudo apt update
sudo apt install openjdk-11-jdk

Change default configuration from JDK

sudo update-alternatives --config java
...
* 0            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1111      auto mode
  1            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1111      manual mode
  2            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081      manual mode
Press <enter> to keep the current choice[*], or type selection number:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment