我正在尝试将
Java SDK 8工具(从debian backports repo安装)设置为默认值.
# 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
嗯,除了那个错误(我相信这只是一个警告)
根据https://askubuntu.com/questions/141791/is-there-a-way-to-update-all-java-related-alternatives.
如果没有,我不知道如何解决这个问题,因为jdk8没有icedtea插件
我可以看到,这本来应该做的,对吧?
但是许多Java工具仍然指向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 ...
是什么赋予了?破碎?
编辑:
解决这个问题:
for i in `update-alternatives --get-selections | grep java | awk '{print $1}'`; do update-alternatives --config $i; done
解决方法
update-java-alternatives有分别更新–jre-headless,– jre和–plugin的选项.
运用
sudo update-java-alternatives --jre-headless --jre --set java-1.8.0-openjdk-amd64
在没有安装插件的Debian Jessie服务器上为我工作.