You can see Oracle-Java is default java environment for now, let us change it to jre, select 2 and press enter. mkdir /opt/jdk tar -zxf jdk-8u5-linux-圆4.tar.gz -C /opt/jdk. Press to keep the current choice, or type selection number: By default, Ubuntu 20.04 includes Open JDK 11, which is an open-source variant of the JRE and JDK. * 0 /usr/lib/jvm/java-8-oracle/jre/bin/java 1072 auto modeġ /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java 1071 manual modeĢ /usr/lib/jvm/java-8-oracle/jre/bin/java 1072 manual mode The easiest option for installing Java is to use the version packaged with Ubuntu. There are 2 choices for the alternative java (providing /usr/bin/java). :~# sudo update-alternatives -config java Install openjdk-17-jre-headless Using apt-get Update apt database with apt-get using the following command. In the following sections we will describe each method. Java HotSpot(TM) 64-Bit Server VM (build 25.74-b02, mixed mode)Īs we have three different flavors of Java installed, let us find appropriate path for java version you wants to make default :~# java -version There are three ways to install openjdk-17-jre-headless on Ubuntu 22.04. Java(TM) SE Runtime Environment (build 1.8.0_74-b02)
0 Comments
Leave a Reply. |