Make Your Oracle JDK 7 as Default JVM in Ubuntu

Oracle Java

In some Linux distros, the vendor included OpenJDK as the default JVM, but sometime this not what you’re looking for. If you want to use Sun JDK instead, you can follow below instructions:

  1. Purge existing OpenJDK from your Ubuntu:
  2. Add a new repository and install Sun JDK:
  3. If you want the JRE and the browser plugin:
  4. You may want to also add the following:

    If you have more than one JVMs in your machine, then you can choose which one you want to use as default JVM.

Then, you can execute this to check default JVM version:

Your newly installed Oracle JDK 7 will be printed out. It’s straight forward, right?

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*