From Indie IT Wiki


Oracle Java 13

This will install the latest Oracle Java 13 as the system wide Java runtime...

sudo add-apt-repository ppa:linuxuprising/java
sudo apt-get update
sudo apt-get install oracle-java13-installer
java --version

This should not affect anyone with the Unifi Controller installed because the /etc/init.d/unifi startup script uses a hard coded JAVA_HOME line pointing to Java 8.

If you need to reconfigure the system wide Java then run this command and choose your Java flavour...

sudo update-alternatives --config java

How to Install Oracle Java 13 in Ubuntu 14.04+

OpenJDK Java 8, 9, 10 or 11

sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt install openjdk-11-jdk

Oracle Java 8

Purge OpenJDK from system:

sudo apt-get purge openjdk*

Add repository and install:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update && sudo apt-get install oracle-java8-installer

Check the installed version:

java -version

Set Java Environment Variable:

sudo apt-get install oracle-java8-set-default

Java 7

...and afterwards run...

sudo update-alternatives --config java
java -version

Older Previous Versions Of Java

HOWTO: Switch JDK Version In Ubuntu

sudo update-alternatives --config java

HOWTO: Uninstall Previous Versions

HOWTO: Check Installed Version

HOWTO: Prevent Inclusion Of Third Party Software During Upgrades (Windows & OS X)

This will prevent the installation items such as browser add-ons when upgrading.

  • Windows >> Control Panel >> Java
  • OS X >> Apple Icon >> System Preferences >> Java

This should bring up the Java Control Panel

Java Control Panel
  • Advanced tab >> Miscellaneous section >> Tick the last option 'Suppress sponsor offers when installing or updating Java'

Thanks to Ghacks.

HOWTO: Prevent Inclusion Of Third Party Software During Installation (Windows)

  • Download the full (offline) installer (not the stub installer)
  • Open the Terminal >> change directory to that holding the downloaded installer
  • Run "jre-8u66-windows-x64.exe SPONSORS=0" - changing the file name as required and omitting the ""

Thanks to Ghacks.