I was building Android apps on Android Studio when it asked me to remove OpenJDK and install Oracle JDK. Now, I was using OpenJDK for building Cyanogenmod.
If I wipe off OpenJDK and install Oracle JDK, would CM builds break?
I was building Android apps on Android Studio when it asked me to remove OpenJDK and install Oracle JDK. Now, I was using OpenJDK for building Cyanogenmod.
If I wipe off OpenJDK and install Oracle JDK, would CM builds break?
Look at this answer to understand the key differences between OpenJDK
and Oracle JDK
.
If you want to use Oracle Java, you have to install it as Paranoid Panda has suggested. Then you have to set your Java
environment variables by adding the following two lines to ~/.bashrc
export JAVA_HOME=/usr/lib/jvm/java-7-oracle
export PATH=$JAVA_HOME/bin:$PATH
If you want, you could also uninstall OpenJDK
from your machine at all. Take a look at this answer for the steps to execute to correctly delete it.
Oracle Java
and add JAVA_HOME
to the $PATH
list, you are telling the system where to locate your Java compiler. Once done the above step, you can execute which javac
and javac -version
to know if the process has gone well.
– tigerjack
Oct 26 '15 at 09:57