Another way to confirm its installed is running this command from your terminal:
dpkg-query -l oracle-java8-installer
You should see this:
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==================================-======================-======================-=========================================================================
ii oracle-java8-installer 8u151-1~webupd8~0 all Oracle Java(TM) Development Kit (JDK) 8
The second i
means its installed.
From man dpkg-query
:
-l, --list [package-name-pattern...]
List packages matching given pattern. If no package-name-pattern is given, list all packages in /var/lib/dpkg/status, excluding the ones
marked as not-installed (i.e. those which have been previously purged). Normal shell wildcard characters are allowed in package-name-pattern.
Please note you will probably have to quote package-name-pattern to prevent the shell from performing filename expansion. For example this
will list all package names starting with “libc6”:
dpkg-query -l 'libc6*'
The first three columns of the output show the desired action, the package status, and errors, in that order.
Desired action:
u = Unknown
i = Install
h = Hold
r = Remove
p = Purge
Package status:
n = Not-installed
c = Config-files
H = Half-installed
U = Unpacked
F = Half-configured
W = Triggers-awaiting
t = Triggers-pending
i = Installed
Error flags:
<empty> = (none)
R = Reinst-required
An uppercase status or error letter indicates the package is likely to cause severe problems. Please refer to dpkg(1) for information about
the above states and flags.
The output format of this option is not configurable, but varies automatically to fit the terminal width. It is intended for human readers,
and is not easily machine-readable. See -W (--show) and --showformat for a way to configure the output format.
apt policy oracle-java8-installer
says that oracle-java8-installer is installed then you don't need to do anything. If the Candidate version of a package is newer than the Installed version then it is possible to use apt to update that package to the latest version using the command:sudo apt upgrade oracle-java8-installer
– karel Nov 18 '17 at 11:52sudo apt install oracle-java8-set-default
– karel Nov 18 '17 at 12:01