Java

From Indie IT Wiki

HOWTO: INSTALL:

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

http://www.duinsoft.nl/packages.php?t=en#repo

...and afterwards run...

sudo update-alternatives --config java
java -version

Older Previous Versions Of Java

http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1880261.html

http://www.oracle.com/technetwork/java/archive-139210.html

HOWTO: Switch JDK Version In Ubuntu

sudo update-alternatives --config java

HOWTO: Uninstall Previous Versions

http://java.com/en/download/uninstallapplet.jsp

HOWTO: Check Installed Version

http://java.com/en/download/installed.jsp

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.