What is the difference between OpenJDK and Oracle JDK?












0














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?










share|improve this question




















  • 2




    Possible duplicate of How can I install Sun/Oracle's proprietary Java JDK 6/7/8 or JRE?
    – user364819
    Oct 25 '15 at 9:56
















0














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?










share|improve this question




















  • 2




    Possible duplicate of How can I install Sun/Oracle's proprietary Java JDK 6/7/8 or JRE?
    – user364819
    Oct 25 '15 at 9:56














0












0








0


1





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?










share|improve this question















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?







java android jdk






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 12 at 9:40

























asked Oct 25 '15 at 9:47









ideaman924

21119




21119








  • 2




    Possible duplicate of How can I install Sun/Oracle's proprietary Java JDK 6/7/8 or JRE?
    – user364819
    Oct 25 '15 at 9:56














  • 2




    Possible duplicate of How can I install Sun/Oracle's proprietary Java JDK 6/7/8 or JRE?
    – user364819
    Oct 25 '15 at 9:56








2




2




Possible duplicate of How can I install Sun/Oracle's proprietary Java JDK 6/7/8 or JRE?
– user364819
Oct 25 '15 at 9:56




Possible duplicate of How can I install Sun/Oracle's proprietary Java JDK 6/7/8 or JRE?
– user364819
Oct 25 '15 at 9:56










1 Answer
1






active

oldest

votes


















0














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.






share|improve this answer























  • Java and Android build system are two different things. When you build an Android app, at some point it calls the Java compiler you have installed on your machine; it doesn't matter the exact type of compiler, you should only have one installed. So, when you install 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.
    – tigerjack89
    Oct 26 '15 at 9:57












  • That being said, you can safely uninstall OpenJDK if you don't want to use it without affecting the build system used by Android.
    – tigerjack89
    Oct 26 '15 at 10:02











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f689642%2fwhat-is-the-difference-between-openjdk-and-oracle-jdk%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














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.






share|improve this answer























  • Java and Android build system are two different things. When you build an Android app, at some point it calls the Java compiler you have installed on your machine; it doesn't matter the exact type of compiler, you should only have one installed. So, when you install 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.
    – tigerjack89
    Oct 26 '15 at 9:57












  • That being said, you can safely uninstall OpenJDK if you don't want to use it without affecting the build system used by Android.
    – tigerjack89
    Oct 26 '15 at 10:02
















0














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.






share|improve this answer























  • Java and Android build system are two different things. When you build an Android app, at some point it calls the Java compiler you have installed on your machine; it doesn't matter the exact type of compiler, you should only have one installed. So, when you install 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.
    – tigerjack89
    Oct 26 '15 at 9:57












  • That being said, you can safely uninstall OpenJDK if you don't want to use it without affecting the build system used by Android.
    – tigerjack89
    Oct 26 '15 at 10:02














0












0








0






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.






share|improve this answer














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.







share|improve this answer














share|improve this answer



share|improve this answer








edited May 23 '17 at 12:39









Community

1




1










answered Oct 25 '15 at 10:15









tigerjack89

1,72541833




1,72541833












  • Java and Android build system are two different things. When you build an Android app, at some point it calls the Java compiler you have installed on your machine; it doesn't matter the exact type of compiler, you should only have one installed. So, when you install 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.
    – tigerjack89
    Oct 26 '15 at 9:57












  • That being said, you can safely uninstall OpenJDK if you don't want to use it without affecting the build system used by Android.
    – tigerjack89
    Oct 26 '15 at 10:02


















  • Java and Android build system are two different things. When you build an Android app, at some point it calls the Java compiler you have installed on your machine; it doesn't matter the exact type of compiler, you should only have one installed. So, when you install 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.
    – tigerjack89
    Oct 26 '15 at 9:57












  • That being said, you can safely uninstall OpenJDK if you don't want to use it without affecting the build system used by Android.
    – tigerjack89
    Oct 26 '15 at 10:02
















Java and Android build system are two different things. When you build an Android app, at some point it calls the Java compiler you have installed on your machine; it doesn't matter the exact type of compiler, you should only have one installed. So, when you install 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.
– tigerjack89
Oct 26 '15 at 9:57






Java and Android build system are two different things. When you build an Android app, at some point it calls the Java compiler you have installed on your machine; it doesn't matter the exact type of compiler, you should only have one installed. So, when you install 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.
– tigerjack89
Oct 26 '15 at 9:57














That being said, you can safely uninstall OpenJDK if you don't want to use it without affecting the build system used by Android.
– tigerjack89
Oct 26 '15 at 10:02




That being said, you can safely uninstall OpenJDK if you don't want to use it without affecting the build system used by Android.
– tigerjack89
Oct 26 '15 at 10:02


















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f689642%2fwhat-is-the-difference-between-openjdk-and-oracle-jdk%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

Mangá

Eduardo VII do Reino Unido