3

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 packages

root@masi:/home/masi# update-java-alternatives -l
java-1.7.0-openjdk-amd64 1071 /usr/lib/jvm/java-1.7.0-openjdk-amd64
jre-8-oracle-x64 317 /usr/lib/jvm/jre-8-oracle-x64

I 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/16920
root@masi:/home/masi/Downloads# update-java-alternatives -s java-6-sun
update-java-alternatives: directory does not exist: /usr/lib/jvm/java-6-sun

root@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.jinfo

root@masi:/home/masi/Downloads# update-java-alternatives -s jre-8-oracle-x64
update-alternatives: error: no alternatives for appletviewer
update-alternatives: error: no alternatives for extcheck
update-alternatives: error: no alternatives for idlj
update-alternatives: error: no alternatives for jar
update-alternatives: error: no alternatives for jarsigner
update-alternatives: error: no alternatives for javac
update-alternatives: error: no alternatives for javadoc
update-alternatives: error: no alternatives for javah
update-alternatives: error: no alternatives for javap
update-alternatives: error: no alternatives for jcmd
update-alternatives: error: no alternatives for jconsole
update-alternatives: error: no alternatives for jdb
update-alternatives: error: no alternatives for jhat
update-alternatives: error: no alternatives for jinfo
update-alternatives: error: no alternatives for jmap
update-alternatives: error: no alternatives for jps
update-alternatives: error: no alternatives for jrunscript
update-alternatives: error: no alternatives for jsadebugd
update-alternatives: error: no alternatives for jstack
update-alternatives: error: no alternatives for jstat
update-alternatives: error: no alternatives for jstatd
update-alternatives: error: no alternatives for native2ascii
update-alternatives: error: no alternatives for rmic
update-alternatives: error: no alternatives for schemagen
update-alternatives: error: no alternatives for serialver
update-alternatives: error: no alternatives for wsgen
update-alternatives: error: no alternatives for wsimport
update-alternatives: error: no alternatives for xjc

Using the auto-mode does not make sense; maybe, I should be deleting some packages in my system first

root@masi:/home/masi/Downloads# update-alternatives --auto java
update-alternatives: using /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java to provide /usr/bin/java (java) in auto mode

OS: Debian 8.5
Linux kernel: 4.6 of backports
Hardware: Asus Zenbook UX303UA
Java: JRE 8 version 102 Oracle x64

2
  • 1
    Just out of curiosity, is the OpenJDK JRE not good enough for you? Commented Sep 19, 2016 at 9:14
  • @StephenKitt Not good enough. IBM SPSS Statistics works only with Oracle Java. Having terrible times with openjdk. Commented Sep 19, 2016 at 9:15

1 Answer 1

3

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 -version
java version "1.8.0_102"
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .