Xubuntu 16.04 + Java9:
Posted: Mon Jan 09, 2017 3:47 pm
[PROBLEM]
Accidentially installed Java 9 on Xubuntu 16.04 (instead of Java .
I've removed Java 9, installed Java 8 and wanted to update the symlink using "update-alternatives" (as usual):
This didn't work as expected and returned the following message:
1) "/usr/lib/jvm" does contain more than just "java-9-openjdk-amd64":
So why doesn't update-alternatives just offer OpenJDK 8?
2) I've removed Java 9 - so why is the folder still here?
[SOLUTION]
"A solution", but not really a clean one is to simply update the symlink "/usr/bin/java" to point to the Java 8 binary:
Yet, I'm still feeling a bit uncomfortable having Java9-leftovers on my system - and an obviously confused "update-alternatives"...
Accidentially installed Java 9 on Xubuntu 16.04 (instead of Java .
I've removed Java 9, installed Java 8 and wanted to update the symlink using "update-alternatives" (as usual):
Code: Select all
$ sudo apt-get remove openjdk-9-jre-headless
$ sudo update-alternatives --config java
2 things are strange/wrong here:update-alternatives: warning: /etc/alternatives/java is dangling; it will be updated with best choice
There is only one alternative in link group java (providing /usr/bin/java): /usr/lib/jvm/java-9-openjdk-amd64/bin/java
Nothing to configure.
1) "/usr/lib/jvm" does contain more than just "java-9-openjdk-amd64":
Code: Select all
lrwxrwxrwx 1 root root 20 Okt 27 21:06 java-1.8.0-openjdk-amd64 -> java-8-openjdk-amd64
-rw-r--r-- 1 root root 2600 Okt 27 21:06 .java-1.8.0-openjdk-amd64.jinfo
drwxr-xr-x 5 root root 4096 Jän 1 15:23 java-8-openjdk-amd64
drwxr-xr-x 3 root root 4096 Jän 1 15:32 java-9-openjdk-amd64
2) I've removed Java 9 - so why is the folder still here?
[SOLUTION]
"A solution", but not really a clean one is to simply update the symlink "/usr/bin/java" to point to the Java 8 binary:
Code: Select all
sudo ln -sf /usr/lib/jvm/java-8-openjdk-amd64/bin/java /usr/bin/java