Answers for "linux install java 11"

15

installing java on linux

# install default JDK
sudo apt install default-jdk
# install default JRE
sudo apt install default-jre
# install specific JDK version
sudo apt install openjdk-17-jdk
# install specific JRE version
sudo apt install openjdk-17-jre
Posted by: Guest on April-06-2021
0

how to upgrade java 8 to 11 in ubuntu

sudo apt-get install openjdk-11-jdk

$ sudo update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).

Selection    Path                                            Priority   Status

* 0            /usr/lib/jvm/java-9-openjdk-amd64/bin/java       1500      auto mode
  1            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1500      manual mode
  2            /usr/lib/jvm/java-9-openjdk-amd64/bin/java       1500      manual mode
Posted by: Guest on January-07-2021
2

install openjdk 11 ubuntu

sudo apt-get update && sudo apt-get upgrade
sudo apt-get install default-jdk
Posted by: Guest on July-17-2020
0

apt install java 11

sudo apt-get update

sudo apt-get install oracle-java11-installer-local
Posted by: Guest on February-19-2020
0

install java on linux

// for debian & debian based linux distributions
	sudo su or su -
  	echo "deb http://ppa.launchpad.net/linuxuprising/java/ubuntu focal main" | tee /etc/apt/sources.list.d/linuxuprising-java.list
    apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 73C3DB2A
    apt-get update
    Ctrl + D or exit
// for Ubuntu, Linux Mint, Pop!_OS or Zorin Os
	sudo add-apt-repository ppa:linuxuprising/java
    sudo apt update
    
// Now you can install Oracle JDK 16 on Debian / Ubuntu and Linux distributions based on these:
	//Install and make Oracle JDK 16 the default JDK version:
		sudo apt install oracle-java16-installer --install-recommends
    //Install but don't make Oracle JDK 16 the default JDK version:
		sudo apt install oracle-java16-installer --no-install-recommends
        
//To check which Java version is set as default on your system
	java -version or javac -version

//To accept the Oracle Java 16 license automatically
	echo oracle-java16-installer shared/accepted-oracle-license-v1-2 select true | sudo /usr/bin/debconf-set-selections
    	//If that doesn't work, also try this command:
    echo oracle-java16-installer shared/accepted-oracle-licence-v1-2 boolean true | sudo /usr/bin/debconf-set-selections
Posted by: Guest on July-18-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language