Heres the error:warning: current package is oracle-java8, but binary format already installed by openjdk-7. i used the purge command on openjdk before i tried to install Oracle Java 8 . now I'm at a loss.
Asked
Active
Viewed 669 times
2
-
1**What** command is giving you that error? – Elliott Frisch Mar 20 '14 at 15:15
-
@ElliottFrisch I used the instructions from [link](http://askubuntu.com/questions/335457/how-to-uninstall-openjdk) to remove OpenJdk... or at least i thought i did. to install i used [Link](http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html)to install Java 8 via PPA. – Catpersonisme Mar 20 '14 at 15:57
-
So you used `sudo apt-get purge openjdk*`? – Elliott Frisch Mar 20 '14 at 15:58
-
@ElliottFrisch Yes. – Catpersonisme Mar 20 '14 at 16:02
-
And how are you installing Oracle Java 8? – Elliott Frisch Mar 20 '14 at 16:02
-
@ElliottFrisch Webupd8.org PPA – Catpersonisme Mar 20 '14 at 16:03
-
I suggest you reinstall openjdk, then install Java 8, then run `update-java-alternatives` to select Java8, then (optionally) try to remove openjdk. The cost of keeping the previous version (in disk space) is pretty low (because modern disks just keep getting bigger). – Elliott Frisch Mar 20 '14 at 16:06
-
@ElliottFrisch Okay, I'll try that now. – Catpersonisme Mar 20 '14 at 16:07
-
@ElliottFrisch It's giving me no root privileges error. – Catpersonisme Mar 20 '14 at 16:15
-
[sudo make me a sandwich](http://xkcd.com/149/) – Elliott Frisch Mar 20 '14 at 16:17
-
@ElliottFrisch If it gives me no readout on the results, that means it worked right? – Catpersonisme Mar 20 '14 at 16:20
-
What is the result of `sudo update-java-alternatives -l`? – Elliott Frisch Mar 20 '14 at 16:22
-
@ElliottFrisch java-1.7.0-openjdk-i386 1071 /usr/lib/jvm/java-1.7.0-openjdk-i386 java-8-oracle 1 /usr/lib/jvm/java-8-oracle oi this mini-markdown formatting jazz is confusing... – Catpersonisme Mar 20 '14 at 16:23
-
Congrats! Java 8 **is** installed. `sudo update-java-alternatives -s java-8-oracle` and then `java -version`. – Elliott Frisch Mar 20 '14 at 16:26
-
@ElliottFrisch Huzzah! Thanks sooooo much. If it's not too much to ask, could you compile the instructions you gave me into an answer, I want to mark it as such, so that others can find it easily. – Catpersonisme Mar 20 '14 at 16:32
1 Answers
3
First, reinstall openjdk. Then install Java 8. Then run update-java-alternatives to select Java8. Finally, (optionally) try to remove openjdk. The cost of keeping the previous version (in disk space) is pretty low (because modern disks just keep getting bigger).
Once you have Java 8 installed, you need to set it as your JVM -
sudo update-java-alternatives -s java-8-oracle
Then you can verify that you have it selected correctly by
java -version
Elliott Frisch
- 2,998
- 1
- 21
- 22
-
If i had more rep, i'd vote up... I guess it's the thought that counts lol. – Catpersonisme Mar 20 '14 at 16:40
-
@Catpersonisme That is okay. Send [lawyers, guns and money](http://en.wikipedia.org/wiki/Lawyers,_Guns_and_Money). – Elliott Frisch Mar 20 '14 at 16:44