Licensing, updates for OpenJDK distribution from Fedora - java

What is the source for the OpenJDK RPMs found in Fedora distributions?
Is it safe to count on Fedora's RPMs for Java for commercial use with long term support?
Neither Oracle nor RedHat licensing seem to be necessary.

What is the source for the OpenJDK rpms found in Fedora distributions?
It's OpenJDK, which is supported.
Is it safe to count on Fedora's rpms for Java for commercial use with long term support?
If you're using an LTS version, yes.
OpenJDK Support from AdoptOpenJdk
OpenJDK support form RedHat

What is the source for the OpenJDK RPMs found in Fedora distributions?
You can use Fedora's tools on Fedora to get the sources: fedpkg clone java-11-openjdk; cd java-11-opendjk; fedpkg prep and you should end up with a directory containing the entire set of (modified) sources for OpenJDK 11.
You can also grab a source rpm (.src.rpm) from an OpenJDK build in Fedora, such as https://koji.fedoraproject.org/koji/buildinfo?buildID=1350114. That source rpm contains an archive of the entire set of sources used in Fedora.
This script is actually used to generate the source archive: https://src.fedoraproject.org/rpms/java-11-openjdk/blob/master/f/generate_source_tarball.sh. If you take a look at it, you can see that it basically grabs sources from the OpenJDK 11 Updates Project itself: http://hg.openjdk.java.net/jdk-updates/jdk11u/
Is it safe to count on Fedora's RPMs for Java for commercial use with long term support? Neither Oracle nor RedHat licensing seem to be necessary.
There's a couple of parts to this answer:
You can definitely use the Fedora packages for whatever task you want, including any commercial tasks. Fedora and OpenJDK are Free Software. They don't restrict your usage.
You definitely don't need a license from Red Hat (or Oracle) to use OpenJDK and Fedora.
If you want support, Fedora is probably the wrong place to look. Fedora is basically self-supported. Red Hat pays developers to work on OpenJDK try and fix issues as they come up. But there's no support or priority guarantees of any sort in Fedora (even if the same developers are active in both). If something breaks, you can only ask the community to help. Support (and priority in addressing bugs) is a major part of Red Hat's value proposition. That said, the developers who work on Fedora RPMs generally do a really good job.
Fedora is definitely not a Long Term Supported release. Fedora releases go out of support (meaning no more security updates for OpenJDK, unless you upgrade to a newer version of Fedora) in a year or so. If you care about a stable (as in, unchanging base), Fedora is probably the wrong tool for the job. If you want to use Fedora, you will have to upgrade every year or so, or you will lose access to security updates in OpenJDK (among other components).
If you care about long term stability and don't want to go down a RHEL route, I would suggest looking at CentOS. It has some of the same downsides as Fedora (no real support, bugs may take some time to be resolved, security updates may not be as quick) but it is maintained by the community for a longer time.
If you just care about OpenJDK binaries on non-Fedora platforms I would also suggest looking at:
OpenJDK binaries from the official OpenJDK 8 and 11 projects: https://adoptopenjdk.net/upstream.html
AdoptOpenJDK binaries built by the community: https://adoptopenjdk.net/index.html
A number of other companies, groups and organizations provide OpenJDK builds that they maintain. I can't really speak about them.
(Disclaimer: I work at Red Hat. I used to work in the team that maintains OpenJDK for Fedora but I work in a different team now.)

Related

Why can I not download OpenJDK-17 in my IntelliJ?

I have a Spring Boot application and I'm trying to set the JDK to OpenJDK-17. I've downloaded it from Java, then I go to IDE and Project Settings > Project Structure > SDKs, and then I click on the '+' > Download JDK. Then when I set the version to 17, I don't see OpenJDK-17 anywhere...
I get the following options:
Amazon Corretto 17.0.6
Azul Zulu Community 17.0.6
BellSoft Liberica JDK 17.0.5
Eclipse Temurin (AdoptOpenJDK HotSpot) 17.0.5
GraalVM Community Edition 17
IBM Semeru (AdoptOpenJDK OpenJ9) 17.0.5
SAP SapMachine 17.0.5
---------Other Versions---------
Oracle OpenJDK 19.0.2
I don't know for sure the rational of the Intellij for (no longer?) including a link to a "vanilla" OpenJDK 17 download site. However my guess is that it is related to this notice on the https://jdk.java.net/17/ release page:
JDK 17 Releases
JDK 17 has been superseded. Please visit jdk.java.net for the current version.
Older releases, which do not include the most up to date security vulnerability fixes and are no longer recommended for use in production, remain available in the OpenJDK Archive.
Note that the OpenJDK team are no longer publishing new builds for OpenJDK 17. If you want the current Java 17 LTS build, you get it as an Oracle release or you get it from a 3rd-party vendor. These should all include the most recent security patches.
The Intellij team would be doing users a disservice if they provided an easy way for users to download an old and potentially insecure OpenJDK Java 17 build.
OpenJDK is basically a source only project (though they do release reference binaries for the first six months, which usually results in three releases, e.g. 17.0.0 - 17.0.2). After those three months, newer releases are only available through the vendors (e.g. for Java 17.0.5). All those listed are variants of OpenJDK 17 (except IBM Semeru, which is OpenJ9, which itself is a variant of OpenJDK). And bar vendor specific extras, or optional features like garbage collectors, they are basically the same, and have been tested for compliance with the Java specification.
In the Java world, you pick a vendor, and use its binaries instead of the binaries from OpenJDK itself (which generally don't go further then x.0.2, while vendor specific versions continue to receive updates if they are LTS versions). Personally, I usually use Eclipse Temurin builds.

Why does JavaFX not work under OpenJDK 17 from Homebrew?

After installing both the OpenJDK and the Temurin casks (testing out first one, then the other), I'm still getting errors like these when running a simple example javafx app from the terminal:
Example.java:1: error: package javafx.application does not exist
It seems to me like JavaFX is not included in OpenJDK for macOS, at least the Homebrew versions, but it should be.
The version I'm installing is 17, on both counts.
What can I do to fix this? (I specifically don't want to install Oracle's JDK, to avoid hefty future licensing fees or potential litigation, which Oracle is known for.)
JavaFX has never been an official part of the Java platform.
For a while, Oracle was bundling the JavaFX libraries with their own Oracle JDK product, but later stopped. Those libraries were a bonus, an extra, not required by the Java specifications.
Keep in mind that several vendors provide Java implementations. At least two of them provide a variant that includes the OpenJFX libraries implementing JavaFX, if that is what you want:
ZuluFX by Azul Systems
LibericaFX from BellSoft
Last time I looked, both of those products were available for macOS on both Intel Macs and Apple Silicon Macs.
Alternatively, you can bundle the OpenJFX libraries within your app.

who is the distributor of openjdk docker image

my understanding is you need to have a distributor to use openjdk someone like (oracle openjdk, adoptopenjdk) but on docker repo for openjdk how do I find out who is the distributor if I just use their reference documentation
{the code below in copied from openjdk official docker repo}
FROM openjdk:11
COPY . /usr/src/myapp
WORKDIR /usr/src/myapp
RUN javac Main.java
CMD ["java", "Main"]
moving from java 8 to java 11
It's all written there on the docker page: https://hub.docker.com/_/openjdk/
openjdk:<version>
This is the defacto image. [...] These are the suite
code names for releases of Debian and indicate which release the image
is based on. [...]
openjdk:<version> (from 12 onwards), [...]
Starting with openjdk:12
the default image as well as the -oracle and -oraclelinux7 variants
are based on the official Oracle Linux 7 image which is provided under
the GPLv2 as per the Oracle Linux End User Agreement (EULA). [...]
TL;DR: the images are maintained by the Docker community, versions < 12 ship the OpenJDK build from Debian or Alpine Linux, later versions ship the Oracle builds.
By the way, until Version including 8, the Oracle JDK was more freely available. Anyway, Linux distributions built their own binaries. The binary distributions by AdoptOpenJDK, Amazon Corretto, etc. are only there, because Oracle doesn't provide binary builds freely anymore. But you can download OpenJDK and build it yourself, if you like.
Edit: You could also ssh into the image and run java -version
Edit2: Java 7 and support
I want to address your comment on my answer. You specifically asked for Java version 7. This version is quite old (first release in 2011!) and you will not find any long term support for without paying for commercial support. Period.
This version also predates the license changes to Oracle binaries, so the whole AdoptOpenJDK argument doesn't matter.
On the OpenJDK Docker Hub page, you can see different images shipping Java 7 builds, some with Alpine Linux and some with Debian Jessie. Those are - presumably, I've only verified that for Debian - builds of the open source OpenJDK project by that distribution. So the GPL with classpath exception should be the license that applies (read: you can use it commercially).
Note that even the LTS-support for Debian Jessie ends next month: https://wiki.debian.org/LTS
That shouldn't be necessarily a problem, depending on where you want to run that image (i.e., facing the public internet vs. private intranet).
If you have to stick with such an old version of Java, you have few options (maybe taking a modern linux image and build OpenJDK yourself [that will be painful, I imagine]).
Edit3: Recent version 7 support and v8+ from AdoptOpenJdk
OK, so you clarified in your comment, that you are not actually looking for version 7 builds.
I did, however, find an up-to-date and supported build of Java 7, by Azul: https://hub.docker.com/r/azul/zulu-openjdk
But you said you're running version 8, looking to go to 11. Then I would highly recommend AdoptOpenJDK, which is currently the most popular build. They offer Docker images as well (Note: they offer different JVMs: Hotspot is the default and highly recommended, OpenJ9 is based on a development by IBM)

Changes required to migrate from Oracle JDK to OpenJDK

We are planning to migrate our project from Oracle JDK to OpenJDK. I have some questions regarding the same.
After doing some analysis I found that OpenJDK will have a feature release every 6 months which is only supported until the next feature release.It's essentially a continuous stream of releases targeted to developers. Now my question is will it be a good idea to migrate to OpenJDK. Because if the
above statement is correct then we need to upgrade OpenJDK in our application every 6 months
Ref : Differences between Oracle JDK and OpenJDK
What are the basic changes required to do this migration. When I say basic changes, I mean I need to understand in very high level.One thing I know that is
Oracle JDK and Open JDK are having different jar licences. So do I need to replace all Oracle JDK jars with OpenJDK jars as its mentioned in
Migrating to OpenJDK from Oracle JDK ?
Currently we are using :
JDK 1.8
Tomcat 8
Windows Operating System for development. Services gets deployed in linux OS
Maven Build tool
Appreciate your help.
Thanks
Now my question is will it be a good idea to migrate to OpenJDK
For Java 11 you might want to, though by Java 11 they will be almost identical.
So do I need to replace all Oracle JDK jars with OpenJDK jars
I would install a version of OpenJDK and use the JARs which came with it. I wouldn't mix and match them.
JDK 1.8
I am not sure gain anything by migrating Java 8. Oracle Java 8 is still supported at least until Jan 2019. After that, you might not get any update, but you might not with OpenJDK either.
If your concern is getting support for Java 8, I suggest contacting a company which will give commercial support Java 8 such as Azul for what seemed like a reasonable price. https://www.azul.com/downloads/zulu/zulu-windows/

Why oracle is maintaining both openJDK and JDK? [duplicate]

NOTE: This question is from 2014. As of Java 11 OpenJDK and Oracle
JDK are converging.
Are there any crucial differences between Oracle and OpenJDK?
For example, are the garbage collection and other JVM parameters the same?
Does GC work differently between the two?
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.
A key difference going forward is the release schedule and support policy.
OpenJDK
OpenJDK will have a feature release every 6 months which is only supported until the next feature release. It's essentially a continuous stream of releases targeted to developers.
Oracle JDK
The Oracle JDK is targeted more towards an enterprise audience which values stability. It's based on one of the OpenJDK releases but
is then given long term support (LTS). The Oracle JDK has releases planned every 3 years.
Source: https://www.oracle.com/java/java9-screencasts.html?bcid=5582439790001&playerType=single-social&size=events
For Java 8, Oracle JDK vs. OpenJDK my take of key differences:
OpenJDK is an open source implementation of the Java Standard Edition platform with contribution from Oracle and the open Java community.
OpenJDK is released under license GPL v2 wherein Oracle JDK is licensed under Oracle Binary Code License Agreement.
Actually, Oracle JDK’s build process builds from OpenJDK source code. So there is no major technical difference between Oracle JDK and OpenJDK.
Apart from the base code, Oracle JDK includes, Oracle’s implementation of Java Plugin and Java WebStart. It also includes third-party closed source and open source components like graphics rasterizer and Rhino respectively.
OpenJDK Font Renderer and Oracle JDK Flight Recorder are the noticeable major differences between Oracle JDK and OpenJDK.
Rockit was the Oracle’s JVM and from Java SE 7, HotSpot and JRockit merged into a single JVM. So now we have only the merged HotSpot JVM available.
There are instances where people claim that they had issues while running OpenJDK and that got solved when switched over to Oracle JDK.
Twitter has its own JDK.
Software like Minecraft expects Oracle JDK to be used. In fact, warns.
For a full list of differences please see the source article: Oracle JDK vs OpenJDK and Java JDK Development Process
The Oracle and OpenJDK JVMs are the same and have the same GC features (as of the latest versions 10+). Prior to Oracle managing the OpenJDK JVM there were concrete differences that made that old Openjdk JVM almost unusable in many environments. The JVMs are now the same.
The JDKs which include the JVM as part of the Kit, differ by licensing, release and maintenance schedule, and the software libraries included in the JDK. Crucial differences to me also mean things that would make code not run if not present. Not only licensing.
diff --brief -r openjdk oraclejdk
Crucially the following files are missing in addition to a bunch of others on the linux JDK (So if you 'claimed' that code didn't work on OpenJDK and did so on OracleJDK while you were using javafx then you were correct):
Only in jdk-10.0.1/bin: javapackager
Only in jdk-10.0.1/bin: javaws
Only in jdk-10.0.1/bin: jcontrol
Only in jdk-10.0.1/bin: jmc
Only in jdk-10.0.1/bin: jweblauncher
Only in jdk-10.0.1/lib: ant-javafx.jar
Only in jdk-10.0.1/lib: deploy
Only in jdk-10.0.1/lib: deploy.jar
Only in jdk-10.0.1/lib: desktop
Only in jdk-10.0.1/lib: fontconfig.bfc
Only in jdk-10.0.1/lib: fontconfig.properties.src
Only in jdk-10.0.1/lib: fontconfig.RedHat.6.bfc
Only in jdk-10.0.1/lib: fontconfig.RedHat.6.properties.src
Only in jdk-10.0.1/lib: fontconfig.SuSE.11.bfc
Only in jdk-10.0.1/lib: fontconfig.SuSE.11.properties.src
Only in jdk-10.0.1/lib: fonts
Only in jdk-10.0.1/lib: javafx.properties
Only in jdk-10.0.1/lib: javafx-swt.jar
Only in jdk-10.0.1/lib: java.jnlp.jar
Only in jdk-10.0.1/lib: javaws.jar
Only in jdk-10.0.1/lib: jdk.deploy.jar
Only in jdk-10.0.1/lib: jdk.javaws.jar
Only in jdk-10.0.1/lib: jdk.plugin.jar
Only in jdk-10.0.1/lib: jfr
Only in jdk-10.0.1/lib: libavplugin-53.so
Only in jdk-10.0.1/lib: libavplugin-54.so
Only in jdk-10.0.1/lib: libavplugin-55.so
Only in jdk-10.0.1/lib: libavplugin-56.so
Only in jdk-10.0.1/lib: libavplugin-57.so
Only in jdk-10.0.1/lib: libavplugin-ffmpeg-56.so
Only in jdk-10.0.1/lib: libavplugin-ffmpeg-57.so
Only in jdk-10.0.1/lib: libbci.so
Only in jdk-10.0.1/lib: libcmm.so
Only in jdk-10.0.1/lib: libdecora_sse.so
Only in jdk-10.0.1/lib: libdeploy.so
Only in jdk-10.0.1/lib: libfxplugins.so
Only in jdk-10.0.1/lib: libglassgtk2.so
Only in jdk-10.0.1/lib: libglassgtk3.so
Only in jdk-10.0.1/lib: libglass.so
Only in jdk-10.0.1/lib: libgstreamer-lite.so
Only in jdk-10.0.1/lib: libjavafx_font_freetype.so
Only in jdk-10.0.1/lib: libjavafx_font_pango.so
Only in jdk-10.0.1/lib: libjavafx_font.so
Only in jdk-10.0.1/lib: libjavafx_iio.so
Only in jdk-10.0.1/lib: libjfxmedia.so
Only in jdk-10.0.1/lib: libjfxwebkit.so
Only in jdk-10.0.1/lib: libnpjp2.so
Only in jdk-10.0.1/lib: libprism_common.so
Only in jdk-10.0.1/lib: libprism_es2.so
Only in jdk-10.0.1/lib: libprism_sw.so
Only in jdk-10.0.1/lib: librm.so
Only in jdk-10.0.1/lib: libt2k.so
Only in jdk-10.0.1/lib: locale
Only in jdk-10.0.1/lib: missioncontrol
Only in jdk-10.0.1/lib: oblique-fonts
Only in jdk-10.0.1/lib: plugin.jar
Only in jdk-10.0.1/lib: plugin-legacy.jar
Only in jdk-10.0.1/lib/security: blacklist
Only in jdk-10.0.1/lib/security: public_suffix_list.dat
Only in jdk-10.0.1/lib/security: trusted.libraries
Only in openjdk-10.0.1: man`
According to the oracle blog, Oracle JDK Releases for Java 11 and Later
Starting with Java 11, Oracle will provide JDK releases under the open source GNU General Public License v2, with the Classpath Exception (GPLv2+CPE), and under a commercial license for those using the Oracle JDK as part of an Oracle product or service, or who do not wish to use open source software. This combination of using an open source license and a commercial license replaces the historical “BCL” license, which had a combination of free and paid commercial terms.
Different builds will be provided for each license, but these builds are functionally identical aside from some cosmetic and packaging differences, described in detail below.
From the BCL to the GPL
The Binary Code License for Oracle Java SE technologies (“BCL”) has been the primary license for Oracle Java SE technologies for well over a decade. The BCL permits use without license fees under certain conditions. To simplify things going forward, Oracle started providing open source licensed OpenJDK builds as of Java 9, using the same license model as the Linux platform. If you are used to getting Oracle Java SE binaries for free, you can simply continue doing so with Oracle’s OpenJDK builds available at jdk.java.net. If you are used to getting Oracle Java SE binaries as part of a commercial product or service from Oracle, then you can continue to get Oracle JDK releases through My Oracle Support (MOS), and other locations.
Functionally identical and interchangeable...
Oracle’s BCL-licensed JDK historically contained “commercial features” that were not available in OpenJDK builds. As promised, however, over the past year Oracle has contributed these features to the OpenJDK Community, including:
Java Flight Recorder,
Java Mission Control,
Application Class-Data Sharing, and
ZGC.
From Java 11 forward, therefore, Oracle JDK builds and OpenJDK builds will be essentially identical.
...yet with some cosmetic and packaging differences
There do remain a small number of differences, some intentional and cosmetic, and some simply because more time to discuss with OpenJDK contributors is warranted.
Oracle JDK 11 emits a warning when using the -XX:+UnlockCommercialFeatures option, whereas in OpenJDK builds this option results in an error. This option was never part of OpenJDK and it would not make sense to add it now, since there are no commercial features in OpenJDK. This difference remains in order to make it easier for users of Oracle JDK 10 and earlier releases to migrate to Oracle JDK 11 and later.
Oracle JDK 11 can be configured to provide usage log data to the “Advanced Management Console” tool, which is a separate commercial Oracle product. We will work with other OpenJDK contributors to discuss how such usage data may be useful in OpenJDK in future releases, if at all. This difference remains primarily to provide a consistent experience to Oracle customers until such decisions are made.
The javac --release command behaves differently for the Java 9 and Java 10 targets, since in those releases the Oracle JDK contained some additional modules that were not part of corresponding OpenJDK releases:
javafx.base
javafx.controls
javafx.fxml
javafx.graphics
javafx.media
javafx.web
java.jnlp
jdk.jfr
jdk.management.cmm
jdk.management.jfr
jdk.management.resource
jdk.packager.services
jdk.snmp
This difference remains in order to provide a consistent experience for specific kinds of legacy use. These modules are either now available separately as part of OpenJFX, are now in both OpenJDK and the Oracle JDK because they were commercial features which Oracle contributed to OpenJDK (e.g., Flight Recorder), or were removed from Oracle JDK 11 (e.g., JNLP).
The output of the java --version and java -fullversion commands will distinguish Oracle JDK builds from OpenJDK builds, so that support teams can diagnose any issues that may exist. Specifically, running java --version with an Oracle JDK 11 build results in:
java 11 2018-09-25
Java(TM) SE Runtime Environment 18.9 (build 11+28)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11+28, mixed mode)
And for an OpenJDK 11 build:
openjdk version "11" 2018-09-25
OpenJDK Runtime Environment 18.9 (build 11+28)
OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)
The Oracle JDK has always required third party cryptographic providers to be signed by a known certificate. The cryptography framework in OpenJDK has an open cryptographic interface, meaning it does not restrict which providers can be used. Oracle JDK 11 will continue to require a valid signature, and Oracle OpenJDK builds will continue to allow the use of either a valid signature or unsigned third party crypto provider.
Oracle JDK 11 will continue to include installers, branding and JRE packaging for an experience consistent with legacy desktop uses. Oracle OpenJDK builds are currently available as zip and tar.gz files, while alternative distribution formats are being considered.
Oracle will deliver releases every three years, while OpenJDK will be released every six months.
Oracle provides long term support for its releases. On the other
hand, OpenJDK supports the changes to a release only until the next
version is released.
Oracle JDK was licensed under Oracle Binary Code License Agreement,
whereas OpenJDK has the GNU General Public License (GNU GPL) version
2 with a linking exception.
Oracle product has Flight Recorder, Java Mission Control, and
Application Class-Data Sharing features, while OpenJDK has the Font
Renderer feature.Also, Oracle has more Garbage Collection options
and better renderers,
Oracle JDK is fully developed by Oracle Corporation whereas the
OpenJDK is developed by Oracle, OpenJDK, and the Java Community.
However, the top-notch companies like Red Hat, Azul Systems, IBM,
Apple Inc., SAP AG also take an active part in its development.
From Java 11 turn to a big change
Oracle will change its historical “BCL” license with a combination of an open source and commercial license
Oracle’s kit for Java 11 emits a warning when using the -XX:+UnlockCommercialFeatures option, whereas in OpenJDK builds, this option results in an error
Oracle JDK offers a configuration to provide usage log data to the “Advanced Management Console” tool
Oracle has always required third party cryptographic providers to be signed by a known certificate, while cryptography framework in OpenJDK has an open cryptographic interface, which means there is no restriction as to which providers can be used
Oracle JDK 11 will continue to include installers, branding, and JRE packaging, whereas OpenJDK builds are currently available as zip and tar.gz files
The javac –release command behaves differently for the Java 9 and Java 10 targets due to the presence of some additional modules in Oracle’s release
The output of the java –version and java -fullversion commands will distinguish Oracle’s builds from OpenJDK builds
Update : 25-Aug-2019
for more details oracle-vs-openjdk
A list of the few remaining cosmetic and packaging differences between Oracle JDK 11 and OpenJDK 11 can be found in this blog post:
https://blogs.oracle.com/java-platform-group/oracle-jdk-releases-for-java-11-and-later
In short:
Oracle JDK 11 emits a warning when using the -XX:+UnlockCommercialFeatures option,
it can be configured to provide usage log data to the “Advanced Management Console” tool,
it has always required third party cryptographic providers to be signed by a known certificate,
it will continue to include installers, branding and JRE packaging,
while the javac --release command behaves slightly differently for the Java 9 and Java 10 targets, and
the output of the java --version and java -fullversion commands will distinguish Oracle JDK builds from OpenJDK builds.
Aside from the obvious licensing difference, the major difference between OpenJDK and OracleJDK 11 are stability and performance updates.
Source: https://www.youtube.com/watch?v=Adv9--6IcQI&t=385
Every 6 months the two codebases will be in-sync. But during the 6 month window OpenJDK will only receive security updates while OracleJDK will receive additional stability and performance updates.
Given that update releases only occur every 3 months for both OpenJDK and OracleJDK this means that you are missing out on (at most) 3 months worth of fixes until the next major release comes out and you upgrade. However, if you choose to stick to LTS releases then a commercial license begins to make more sense.
Also for Java 8 an interesting performance benchmark for reactive (non-blocking) Spring Boot REST application being hosted on various JVMs by AMIS Technology Blog has been published in Nov 2018 showing that, among other differences:
OpenJDK has higher CPU usage than OracleJDK,
OpenJDK has slightly lower response time than OracleJDK,
OpenJDK has higher memory usage than OracleJDK,
For details please see the source article.
Of course YMMV, this is just one of the benchmarks.
OpenJDK
OpenJDK is opened source code, it is maintained and developed by Oracle, but allows communities and other companies to participate in this development, such as Red Hat, Azul Systems, IBM, Apple Inc, etc. OpenJDK is both a JDK product and a specification, any company or organization that wants to use OpenJDK to create a new variant must comply with those specifications.
OpenJDK is developed by Oracle and the community contributions. We sometimes have issues on its stability; however, based on user feedback, it will be upgraded to perform better. OpenJDK is regularly updated, around every 6 months.
Oracle JDK
Oracle JDK is maintained and developed by Oracle. It complies with OpenJDK specifications, but it is not opened source code. Oracle JDK is much better in terms of the JVM responsiveness and productivity. It focuses more on the stability due to its importance to the corporate customers.
Source: https://o7planning.org/12571/history-of-java-and-the-difference-between-oracle-jdk-and-openjdk
My understanding is that Oracle JDK can't be used in production, therefore I cannot legally use it (without paying), for the web application I am building for my company. I have to use OpenJDK. Please correct me if I am wrong! From this article.
Starting with Java 11, the Oracle JDK is restricted to development and
testing environments. Oracle JDKs may only be used in production if
you buy the commercial support. Instead, Oracle will provide Java
builds based on OpenJDK for free which can be used in production. But
for the official Oracle JDK the real roadmap will look like this:
UPDATE: I'm wrong. I can use Oracle JDK for free but won't get security updates after 6 mos and we'll have to assume the risk. Look at the above linked article section "What does the new release train mean to my company?".
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, we intend 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 codebases.
· Yes, the garbage collection and other JVM parameters are the same.
· The performance of GC is the same in both.

Categories

Resources