Monday, May 6, 2024
9
rated 0 times [  9] [ 0]  / answers: 1 / hits: 45131  / 1 Year ago, thu, may 4, 2023, 12:09:40

I decided to update my JDK7 to recent version from here.



Corresponding x64 tag.gz archive for my architecture has been downloaded and extracted to /usr/lib/jvm as usual. All previous versions of Java were installed before the same way. But before setting new alternatives for java, javac and javaws I removed all existing alternatives using the following commands:



sudo update-alternatives --remove-all java
sudo update-alternatives --remove-all javac
sudo update-alternatives --remove-all javaws


Now when trying to install new alternatives I get the following:



sudo update-alternatives --install /usr/lib/jvm/jdk1.7.0_13/bin/java java /usr/bin/java 1
update-alternatives: error: alternative path /usr/bin/java doesn't exist.


Of course, /usr/bin/java doesn't exist but /usr/bin does? What's wrong with it and how can I fix it?


More From » installation

 Answers
7

It's my epic fault! :)



I mixed up the arguments of update-alternatives. The right command line must be:



sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk/bin/java 1

[#32725] Thursday, May 4, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
hreadsoplet

Total Points: 220
Total Questions: 108
Total Answers: 105

Location: Serbia
Member since Fri, Jun 3, 2022
2 Years ago
;