I'm trying to set the Java SDK 8 tools (installed from the debian backports repo) as the defaults.
# update-java-alternatives --list
java-1.7.0-openjdk-amd64 1071 /usr/lib/jvm/java-1.7.0-openjdk-amd64
java-1.8.0-openjdk-amd64 1069 /usr/lib/jvm/java-1.8.0-openjdk-amd64
# update-java-alternatives --set /usr/lib/jvm/java-1.8.0-openjdk-amd64
update-alternatives: error: no alternatives for mozilla-javaplugin.so
update-java-alternatives: plugin alternative does not exist: /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/IcedTeaPlugin.so
Hum, well aside from that error (which I am lead to believe is merely a warning according to https://askubuntu.com/questions/141791/is-there-a-way-to-update-all-java-related-alternatives . If not, I don't know how to fix this, as there is no icedtea plugin for jdk8 that I can see), this should have done the trick, right?
But many Java tools still point to Java 7:
# update-alternatives --get-selections | grep java
appletviewer manual /usr/lib/jvm/java-8-openjdk-amd64/bin/appletviewer
extcheck auto /usr/lib/jvm/java-7-openjdk-amd64/bin/extcheck
idlj auto /usr/lib/jvm/java-7-openjdk-amd64/bin/idlj
jar auto /usr/lib/jvm/java-7-openjdk-amd64/bin/jar
jarsigner auto /usr/lib/jvm/java-7-openjdk-amd64/bin/jarsigner
java manual /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
javac auto /usr/lib/jvm/java-7-openjdk-amd64/bin/javac
javadoc auto /usr/lib/jvm/java-7-openjdk-amd64/bin/javadoc
...
What gives? Broken?
EDIT:
Worked around this with:
for i in `update-alternatives --get-selections | grep java | awk '{print $1}'`; do update-alternatives --config $i; done
This will manually prompt you for each and every tool. Which takes about a minute. Still, I would like to know if there is a better way.