The command update-java-alternatives -s jre-8-oracle-x64 is completely valid (found in documentation also here) but I get errors. The package is also seen in the list of Java packagesroot@masi:/home/masi# update-java-alternatives -ljava-1.7.0-openjdk-amd64 1071 /usr/lib/jvm/java-1.7.0-openjdk-amd64jre-8-oracle-x64 317 /usr/lib/jvm/jre-8-oracle-x64I do but cannot get jre-8-oracle-x64 work in my system without errors# https://wiki.debian.org/JavaPackage# http://unix.stackexchange.com/a/310787/16920root@masi:/home/masi/Downloads# update-java-alternatives -s java-6-sunupdate-java-alternatives: directory does not exist: /usr/lib/jvm/java-6-sunroot@masi:/home/masi/Downloads# ls /usr/lib/jvm/default-java/                    java-7-openjdk-amd64/java-1.7.0-openjdk-amd64/        jre-8-oracle-x64/.java-1.7.0-openjdk-amd64.jinfo  .jre-8-oracle-x64.jinforoot@masi:/home/masi/Downloads# update-java-alternatives -s jre-8-oracle-x64update-alternatives: error: no alternatives for appletviewerupdate-alternatives: error: no alternatives for extcheckupdate-alternatives: error: no alternatives for idljupdate-alternatives: error: no alternatives for jarupdate-alternatives: error: no alternatives for jarsignerupdate-alternatives: error: no alternatives for javacupdate-alternatives: error: no alternatives for javadocupdate-alternatives: error: no alternatives for javahupdate-alternatives: error: no alternatives for javapupdate-alternatives: error: no alternatives for jcmdupdate-alternatives: error: no alternatives for jconsoleupdate-alternatives: error: no alternatives for jdbupdate-alternatives: error: no alternatives for jhatupdate-alternatives: error: no alternatives for jinfoupdate-alternatives: error: no alternatives for jmapupdate-alternatives: error: no alternatives for jpsupdate-alternatives: error: no alternatives for jrunscriptupdate-alternatives: error: no alternatives for jsadebugdupdate-alternatives: error: no alternatives for jstackupdate-alternatives: error: no alternatives for jstatupdate-alternatives: error: no alternatives for jstatdupdate-alternatives: error: no alternatives for native2asciiupdate-alternatives: error: no alternatives for rmicupdate-alternatives: error: no alternatives for schemagenupdate-alternatives: error: no alternatives for serialverupdate-alternatives: error: no alternatives for wsgenupdate-alternatives: error: no alternatives for wsimportupdate-alternatives: error: no alternatives for xjcUsing the auto-mode does not make sense; maybe, I should be deleting some packages in my system firstroot@masi:/home/masi/Downloads# update-alternatives --auto javaupdate-alternatives: using /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java to provide /usr/bin/java (java) in auto modeOS: Debian 8.5Linux kernel: 4.6 of backportsHardware: Asus Zenbook UX303UAJava: JRE 8 version 102 Oracle x64    
How to update-java-alternatives successfully to Oracle's one in Debian?
debian;java
Those errors are harmless because you're using a JRE; the missing commands are provided by JDKs only. After running update-java-alternatives -s jre-8-oracle-x64, java -version will confirm you're using the Oracle JRE by default:$ java -versionjava version 1.8.0_102Java(TM) SE Runtime Environment (build 1.8.0_102-b14)Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)