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 artful main

apt-key adv --keyserver --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/
#tar xjf firefox-52.4.1esr.tar.bz2
#rm -rf firefox
tar xjf firefox-52.9.0esr.tar.bz2
cd firefox/
rm -rf update*
./firefox -no-remote

Also disable updates from the Settings,

Tools > Preferences
Advanced // Update // Never check for updates

Deploy the Java plugin,

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

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 {

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

Alternate solution would be OpenJDK with icedtea-plugin.

Nethence | Pub | Lab | Pbraun | SNE Russia | xhtml