jdk_switcher
jdk_switcher copied to clipboard
Failed to switch to openjdk8
Faced with this issue on travis-ci https://travis-ci.org/teamed/qulice/jobs/393331163#L460-L465
and reproduced locally
jdk_switcher use openjdk8
Switching to OpenJDK8 (java-1.8.0-openjdk-amd64), JAVA_HOME will be set to /usr/lib/jvm/java-8-openjdk-amd64
update-java-alternatives: plugin alternative does not exist: /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/IcedTeaPlugin.so
After that javac and java point to a completely wrong jdk - highest insalled (10.0.1 in my case).
This is actually a bug in update-java-alternatives. See #20.
I thought that there would be interest in working around the issue in jdk_switcher but the linked issue got closed.