OpenJdk works well for using java programming & also for most of the needs .But when you want to install Android Studio on ubuntu it is recommended to uninstall Openjdk 8 and install Oracle Jdk for proper functioning of Android Studio.OpenJDk works for Android Studio but you will get a warning message while installing Android Studio that "Openjdk Shows Intermittent Performance and UI issues.We recommend using the Oracle JRE/JDK.". So it is better to stick with Oracle JRE /JDK.
Steps to remove openjdk 8 from ubuntu :-
- Open the Terminal
- Type "java -version" to know the version of java
- Now Install / Open "Synaptic Package Manager"
- Type "JDK" in Quick Filter search box
- You will get the list of packages installed with a Green Tick mark
- You need to delete all the packages marked with green by right clicking on the package and select " Mark for complete Removal"
- Click on "Apply" Button to remove the package
- Once you are done with uninstall all the packages related to JDK. Type "JRE" in the quick filter search box
- You will get the list of packages installed with a Green Tick mark similar to the steps from 5- 7
- But some inter linked packages are still needed to removed. Remove the related JRE packages.
- Once you have removed all the packages related to JDK & JRE
- Open the terminal and cross check it with the command "java - version or javac - version"
- That's it guys you have succesfully removed openjdk from your ubuntu operating system
This method works perfectly on all versions of ubuntu . ubuntu 14.04 LTS (Trusty Tahr) , ubuntu 14.10 (utopic unicorn) , ubuntu 15.04 (vivid vervet) , ubuntu 15.10 (wily werewolf)