Hello, i am new to programming and trying to learn java. Since i am on linux open jdk was recommended instead of the oracle jdk!
I know open jdk is free and open source but apart from that how do they differ in every day use ? Are there things that might be done differently ?
java - Differences between Oracle JDK and OpenJDK - Stack Overflow
Better performance? Building OpenJDK with Cygwin vs Oracle JDK. Has anyone ever noticed difference? (for an idiot purpose: Gaming)
New to programming, is there any difference between open jdk and oracle jdk in day to day use ?
What do you want to know about OpenJDK?
Videos
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.
You would find interesting this excerpt from 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.
As Oracle is responsible for creating both, it's clear that it will ensure that its clients will have good reasons for paying, and performance is the obvious means.
I believe that OpenJDK is interpreter-only JVM. This is easier to port as it has no architecture specific assembly code but, unfortunately, it's less performant.
OracleJDK I think takes advantage of the platform's floating point ABI (Soft Float on RP1 and Hard Float on RP2). It might also have some amount of platform-specific code to make it faster.
A JIT (just-in-time) compiler was once included in both, named Shark, but I have no knowledge if it is included in OpenJDK. Wikipedia OpenJDK does not mention JIT and I did find this old and troubling issue Remove Shark compiler. However, Wikipedia Java version history does include JIT.
If OracleJDK today includes a platform-specific JIT compiler, but OpenJDK does not, that might well explain the difference in performance,
As for Java 11, the differences are basically the installer, crypto providers (signed vs. unsigned), and a few command-line options for advanced management and migration from earlier versions, as explained in this Oracle blog post: https://blogs.oracle.com/java-platform-group/oracle-jdk-releases-for-java-11-and-later
Earlier versions had a few additional differences: they had other 2D, font rendering, serviceability/management, and crypto libraries and that could cause performance differences, as explained here: https://www.thegeekdiary.com/openjdk-v-s-oracle-jdk-differences-between-openjdk-and-oracle-jdk/. Memory management and class data sharing could be the reason for different performance characteristics too.
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.