Both OpenJDK and Oracle JDK are created and maintained currently by Oracle only.
OpenJDK and Oracle JDK are implementations of the same Java specification passed the TCK (Java Technology Certification Kit).
Most of the vendors of JDK are written on top of OpenJDK by doing a few tweaks to [mostly to replace licensed proprietary parts / replace with more high-performance items that only work on specific OS] components without breaking the TCK compatibility.
Many vendors implemented the Java specification and got TCK passed. For example, IBM J9, Azul Zulu, Azul Zing, and Oracle JDK.
Almost every existing JDK is derived from OpenJDK.
As suggested by many, licensing is a change between JDKs.
Starting with JDK 11 accessing the long time support Oracle JDK/Java SE will now require a commercial license. You should now pay attention to which JDK you're installing as Oracle JDK without subscription could stop working. source
Ref: List of Java virtual machines
Answer from Venkateswara Rao on Stack OverflowOut of pure interest, since I never dared use OpenJDK for it. I have been running Ubuntu + running updates of Oracle JDK7 since we started.
It is fairly easy just downloading, unpacking and shifting java instance with update-alternatives - but I'm curious if what the drawbacks/benefits would be to run on OpenJDK. Back when it was version 6 it was out of the question as I understood it, but now I hear people are doing it. Does anyone have performance/stability comparisons? What is your experience? Tell me some stories :)
Both OpenJDK and Oracle JDK are created and maintained currently by Oracle only.
OpenJDK and Oracle JDK are implementations of the same Java specification passed the TCK (Java Technology Certification Kit).
Most of the vendors of JDK are written on top of OpenJDK by doing a few tweaks to [mostly to replace licensed proprietary parts / replace with more high-performance items that only work on specific OS] components without breaking the TCK compatibility.
Many vendors implemented the Java specification and got TCK passed. For example, IBM J9, Azul Zulu, Azul Zing, and Oracle JDK.
Almost every existing JDK is derived from OpenJDK.
As suggested by many, licensing is a change between JDKs.
Starting with JDK 11 accessing the long time support Oracle JDK/Java SE will now require a commercial license. You should now pay attention to which JDK you're installing as Oracle JDK without subscription could stop working. source
Ref: List of Java virtual machines
For Java 7, nothing crucial. The OpenJDK project is mostly based on HotSpot source code donated by Sun.
Moreover, OpenJDK was selected to be the reference implementation for Java 7 and is maintained by Oracle engineers.
There's a more detailed answer from 2012 on difference between JVM, JDK, JRE & OpenJDK, which links to an Oracle blog post:
Q: What is the difference between the source code found in the OpenJDK repository, and the code you use to build the Oracle JDK?
A: It is very close - our build process for Oracle JDK releases builds on OpenJDK 7 by adding just a couple of pieces, like the deployment code, which includes Oracle's implementation of the Java Plugin and Java WebStart, as well as some closed source third party components like a graphics rasterizer, some open source third party components, like Rhino, and a few bits and pieces here and there, like additional documentation or third party fonts. Moving forward, our intent is to open source all pieces of the Oracle JDK except those that we consider commercial features such as JRockit Mission Control (not yet available in Oracle JDK), and replace encumbered third party components with open source alternatives to achieve closer parity between the code bases.
Videos
Maybe in 2015, when the question was asked, Minecraft was unplayable in OpenJDK, but today (in early 2020) I play Minecraft weekly using Ubuntu 18.04 and OpenJDK 8 (right now version 8u242-b08-0ubuntu3~18.04) without any issue. Umm, maybe in windowed mode sometimes I lose mouse and/or keyboard response, but in fullscreen the gameplay is smooth.
The main difference is in the distribution license:
- Oracle JDK was licensed under Oracle Binary Code License Agreement.
- OpenJDK has GNU GPLv2 (the GNU General Public License).
The use and distribution of Oracle Java is restricted by its license, so Ubuntu can't ship it in their distribution. In the other hand, OpenJDK is completely open source and can be distributed, used and modified freely.
You can install Oracle Java manually in Ubuntu 18.04, but you need to update it. OpenJDK is installed from the official Ubuntu repositories and is kept up-to-date by its maintainers with security patches up to date.
About performance, there is some enhancements in Oracle Java. You can search "oracle java vs openjdk" in your favourite search engine and read webs like this: https://www.educba.com/oracle-vs-openjdk/
And finally: https://community.oracle.com/blogs/vincentvauban/2018/04/23/public-updates-for-oracle-java-se-8-released-after-january-2019-will-not-be-available-for-business
Public updates for Oracle Java SE 8 released after January 2019 will not be available for business, commercial or production use without a commercial license.
If you are acting on behalf of an ENTERPRISE, Oracle recommends you review the roadmap information for Java SE 8 and beyond and begin to assess your ongoing Java support requirements in order to migrate to a later release or obtain a commercial license, as appropriate, on a timely basis.
The official advice is that you should use Oracle Java, since that's what Minecraft's developed against. However OpenJDK is pretty much equivalent in functionality so you can use OpenJDK for Minecraft.
If you run into problems however, try switching to Oracle Java.
What JDK 16 should I use Oracle JDK or the Open version?
I'd absolutely go Sun/Oracle Java 8.
While it is based on the OpenJDK there are possible propriety optimisations that could be made by Oracle.
Q: What is the difference between the source code found in the OpenJDK repository, and the code you use to build the Oracle JDK?
A: It is very close - our build process for Oracle JDK releases builds on OpenJDK 7 by adding just a couple of pieces, like the deployment code, which includes Oracle's implementation of the Java Plugin and Java WebStart, as well as some closed source third party components like a graphics rasterizer, some open source third party components, like Rhino, and a few bits and pieces here and there, like additional documentation or third party fonts. Moving forward, our intent is to open source all pieces of the Oracle JDK except those that we consider commercial features such as JRockit Mission Control (not yet available in Oracle JDK), and replace encumbered third party components with open source alternatives to achieve closer parity between the code bases.
tl;dr: Both based on the same codebase, made by Oracle. For what you care about (performance) they're the same.
I will get back the use of Java on my gaming system, more specifically for Minecraft (and any other game that use Java)... As many of you guys have made up entire systems, do anyone has migrated from Oracle JDK to OpenJDK and have gained any performance on heavy programs?
Feel free to explain in the same way you explain to a kid. I'm not a programmer, just a guy who likes computers.
I created my server a few years ago when java SE 18 was the primary application. A few months ago I was getting back into Minecraft and got my server updated and everything was running great. One day I updated my Java application and downloaded OracleJDK 24 and my server immediately started having problems, the biggest was that 9 times out of 10 when trying to connect users would get an error message saying "Failed to connect to Authentication servers". The other issues I was having were related to API's not connecting and occasional "Yggdrasil seed issues" on my server console. There isn't a lot of people talking about this same issue that I saw so troubleshooting was on me, I tried contacting Mojang Support but they don't support home servers. Eventually I was considering deleting everything and building a new server when I noticed that the website recommended OpenJDK21 as the Java application. So I uninstalled OracleJDK 24, downloaded OpenJDK 21 and boom no more login issues, no more API failed to connect to this plugins website, and no more Yggdrasil issues. The common troubleshooting steps pointed to Plugin issues, Port forwarding issues, Mojang servers being down and none of that fixed my problem. I hope that this post can help someone out there having the same issue I was.
I'm new to modding and programming, and I was wondering which jdk I need to download to start. I saw alot of things mention 8 but it needs an account with info regarding work wich doesn't apply here. Is it what's needed?
If you are going to use Oracle JDK8 and don't want to sign up, look up an account on https://bugmenot.com
If you are fine with non-oracle JDK (OpenJDK), https://adoptopenjdk.net might be better for the case of modding
Yes you should download java 8 from the offical oracle website. I don‘t know where you are asked for a reason to download java.