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.

  • 1
    What command is giving you that error? – Elliott Frisch Mar 20 '14 at 15:15
  • @ElliottFrisch I used the instructions from link to remove OpenJdk... or at least i thought i did. to install i used Linkto 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

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

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.