Get Java ready

Oracle binaries

got jdk16

dpkg -i jdk-16.0.1_linux-x64_bin.deb

or jdk13

dpkg -i jdk-13.0.2_linux-x64_bin.deb

or the older jdk8

tar xzf jdk-8u271-linux-x64.tar.gz
mv jdk1.8.0_271/ /usr/lib/jvm/

then

apt-get -f install
ls -lF /usr/lib/jvm/
vi /etc/bash.bashrc

export JAVA_HOME=/usr/lib/jvm/jdk-16.0.1
export PATH=$PATH:$JAVA_HOME/bin

source /etc/bash.bashrc
echo $JAVA_HOME
echo $PATH

update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk-16.0.1/bin/java 2082
update-java-alternatives -l
ls -lF /usr/lib/jvm/.*.jinfo
update-alternatives --config java

and check

which java
java -version

JNLP

no need for Oracle Java here. Go for OpenJDK

update-java-alternatives --jre --set java-1.11.0-openjdk-amd64
update-java-alternatives --jre-headless --set java-1.11.0-openjdk-amd64
#update-java-alternatives --set java-1.11.0-openjdk-amd64

apt install icedtea-netx
#icedtea-plugin

javaws launch.jnlp

The middle ages school

apt install apt-transport-https software-properties-common
add-apt-repository ppa:linuxuprising/java
apt update

#mkdir -p /var/cache/oracle-jdk11-installer-local/
#mv jdk-11.0.4_linux-x64_bin.tar.gz /var/cache/oracle-jdk11-installer-local/
#apt install oracle-java11-installer-local
#apt install oracle-java11-set-default-local

#apt install oracle-java13-installer oracle-java13-set-default
#http://download.oracle.com/otn-pub/java/jdk/13.0.2+8/d4173c853231432d94f001e99d882ca7/jdk-13.0.2_linux-x64_bin.tar.gz

The old school

apt install software-properties-common
add-apt-repository ppa:webupd8team/java
apt update

or

vi /etc/apt/sources.list

deb http://ppa.launchpad.net/webupd8team/java/ubuntu artful main

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C2518248EEA14886

proceed

apt install oracle-java8-installer oracle-java8-set-default
which java
ls -lF /etc/alternatives/java #/usr/lib/jvm/java-8-oracle/jre/bin/java
java -version

Resources

the old school

http://ppa.launchpad.net/webupd8team/java/ubuntu/dists/

https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-get-on-debian-8

https://askubuntu.com/questions/13065/how-do-i-fix-the-gpg-error-no-pubkey

java 8 jdk https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html

java 8 jre https://www.java.com/en/download/ https://www.java.com/en/download/linux_manual.jsp

openjdk

https://askubuntu.com/questions/1134881/icedtea-8-cannot-run-any-jnlp-application-maybe-due-to-openjdk-11

oracle jdk 8

https://github.com/jitsi/jitsi/issues/162

alternatives

https://bitmingw.com/2019/08/28/ubuntu-update-alternatives/

https://stackoverflow.com/questions/12787757/how-to-use-the-command-update-alternatives-config-java

https://askubuntu.com/questions/315646/update-java-alternatives-vs-update-alternatives-config-java


GUIDES | LECTURES | BENCHMARKS | SMTP HEALTH