Deal with Java

Oracle Java

install Oracle Java on Ubuntu,

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

Debian9/stretch // Devuan/ascii,

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

and proceed,

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

Embedding it into an (old) Web Browser

To get Java plug-in to work into firefox you need an older version: v52 ESR (not latest release). AND YOU ALSO NEED TO PREVENT IT FROM UPDATING ITSELF TO ESR 60,

cd ~/opt/
#wget https://download-installer.cdn.mozilla.net/pub/firefox/releases/52.4.1esr/linux-x86_64/en-US/firefox-52.4.1esr.tar.bz2
#tar xjf firefox-52.4.1esr.tar.bz2
wget https://download-installer.cdn.mozilla.net/pub/firefox/releases/52.9.0esr/linux-x86_64/en-US/firefox-52.9.0esr.tar.bz2
#rm -rf firefox
tar xjf firefox-52.9.0esr.tar.bz2
cd firefox/
rm -rf update*
./firefox -no-remote
#--ProfileManager

Deploy the Java plugin,

cd ~/.mozilla/plugins
#cd /usr/lib/firefox-addons/plugins/
ln -s /usr/lib/jvm/java-8-oracle/jre/lib/amd64/libnpjp2.so

Start menu > Oracle Java 8 plugin control panel
security > add exceptions e.g. http://localhost:xx (the port number matters)

To get to the Java console of e.g. some old enterprise-class servers, a quick and dirty fix would be,

#ls -l /usr/lib/jvm/java-8-oracle/jre/lib/security/java.policy
#cp -pi /usr/lib/jvm/java-8-oracle/jre/lib/security/java.policy /usr/lib/jvm/java-8-oracle/jre/lib/security/java.policy.dist
#vi /usr/lib/jvm/java-8-oracle/jre/lib/security/java.policy

ls -l /etc/java-8-oracle/security/java.policy
cp -pi /etc/java-8-oracle/security/java.policy /etc/java-8-oracle/security/java.policy.dist
vi /etc/java-8-oracle/security/java.policy

grant {
        permission java.security.AllPermission;
};

References about older versions of Java, just for the record:

Alternate solution would be OpenJDK with icedtea-plugin.