Monday, May 6, 2024
 Popular · Latest · Hot · Upcoming
7
rated 0 times [  7] [ 0]  / answers: 1 / hits: 20397  / 2 Years ago, wed, december 15, 2021, 2:51:24

I am trying to install oracle jdk7 64bit on my computer.



I found this How do I install Oracle Java JDK 7?



It uses update-alternative -install to install the JDK which is new to me.



I used to only extract the files and add the jdk location to the PATH environment variable before.



Now it seems that I have to run the following commands more than once if I want to install other executables:



sudo update-alternatives --install "/usr/bin/xx" "xx" "/usr/lib/jvm/jdk1.7.0/bin/xx" 1
sudo chmod a+x /usr/bin/xx


Just like the post said:




N.B. remember - Java JDK has many more executables that you can
similarly install as above. java, javac, javaws are probably the most frequently required.




I think this is rather inflexible. So I want to know what the advantage of using update-alternative to install jdk over other methods is.


More From » java

 Answers
2

The command sudo apt-get install openjdk-7-jdk should do the job. If there is a dependency problem run



 sudo apt-get -f install


and rerun the earlier command.


[#31807] Friday, December 17, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
leadprogres

Total Points: 298
Total Questions: 114
Total Answers: 139

Location: Samoa
Member since Mon, Nov 8, 2021
3 Years ago
;