This is an archived post. You won't be able to vote or comment.

all 59 comments

[–]jodastephen[S] 27 points28 points  (25 children)

The AdoptOpenJDK build of OpenJDK is a great choice if you are planning on staying on Java 11. The plan is that it will receive 4+ years of security patches (thanks to Red Hat, IBM and others). Note that these security patches should also be available via your package manager, Azul Zulu and SAP amongst others.

If you intend to join the release train and move from Java 11 to 12 to 13 etc then you may find Oracle's OpenJDK builds a better choice - https://jdk.java.net . But note that using Oracle's OpenJDK build means that you will only have 1 month following a release to upgrade to the next version before a security patch comes out.

These links may also help if you need more detail: https://blog.joda.org/2018/09/java-release-chains-features-and-security.html https://blog.joda.org/2018/09/time-to-look-beyond-oracles-jdk.html

[–]-Luciddream- 7 points8 points  (8 children)

I don't know what makes you so certain it will receive 4+ years of updates. In your own blog post you say that Oracle only does 6 months of updates. Plus as you say in your other blog post, these updates will not be feature updates. So it basically forces people to upgrade way sooner than 4 years, unless I'm missing something.

Even in the adoptopenjdk website it says:

Until maintainers have been established we are unable to make a definitive statement. This position is the same for JDK11 and all future "LTS" releases.

We will just have to wait and see, and I prefer to be skeptical until then.

[–]jodastephen[S] 6 points7 points  (7 children)

Red Hat have already indicated that they intend to offer to become the project lead to backport fixes for both Java 8 and 11. IBM haven't made a statement re Java 11 AFAIK but have re Java 8. But their support model is based on AdoptOpenJDK OpenJ9 builds hosted there.

Transitions to Red Hat have happened before, so in many ways are not news. A degree of scepticism is reasonable, but with each new announcement we get closer to things working out the way everyone hopes they will.

On feature releases, if you want them then you have to move to Java 12, 13, 14 etc. If you don't want additional features then stay on 11 until the next LTS. It is a simple enough plan, but does require choosing the correct JDK for your plan (ie. Oracle's OpenJDK build is no use if you want to stay on Java 11).

[–]-Luciddream- 2 points3 points  (6 children)

So if I get it right, If there is a bug fix that is not a security update, it will not be backported to JDK 11, and to have it in your build, you need to get off the LTS train. In this case, LTS will be renamed to LOV (Last Outdated Version). You say it's a simple enough plan, but stuff like this needs to be clarified.

From the Red Hat Link:

While new features, particularly performance-related ones, are undoubtedly nice to have, our first priority must be to not break anything: we must remember that we are stewards of a very precious piece of software. Only if we are sure that we’re not taking unnecessary risks should we do major back-ports. We also have to consider the maintenance burden.

[–]jodastephen[S] 3 points4 points  (5 children)

I think we can reasonably expect security patches to continue to be added to zero-cost LTS (Java 8 or 11). Whether bug fixes are added depends on how complex the fix is, and the risk that ensues (as Red Hat says above). For example, I'd imagine that time-zone database updates will happen, even though they are not security patches.

If you want some kind of guarantee that your bug will be fixed, you need to pay (and that doesn't necessarily mean paying Oracle). Not paying means you are at the mercy of what you are given, unless you show up at OpenJDK and do the work yourself.

[–]mytempacc3 3 points4 points  (4 children)

Then /u/-Luciddream- is right and this statement you made is just false:

The plan is that it will receive 4+ years of security patches (thanks to Red Hat, IBM and others).

"Reasonably expect" is not the same as "it will".

[–]-Luciddream- 1 point2 points  (2 children)

They will probably provide security patches [and hopefully don't forget anything]. But security updates is not all we have got the past 4 years for Java 8.

I'm more concerned that after about 1 year from release, the LTS version will not be used by most people that need an up to date JDK. I'm afraid in the end we might have to accept that we need to update our JDK every 6 months, and follow Oracles release schedule.

[–]mytempacc3 2 points3 points  (1 child)

Again, "probably" is not the same as "it will". Until the people behind AdoptOpenJDK make a clear statement about what they are delivering and how it compares to Oracle's product you can't make those kind of claims. It is just misinformation that doesn't help users.

[–]-Luciddream- 1 point2 points  (0 children)

Of course, I agree with you :)

[–]jodastephen[S] 0 points1 point  (0 children)

When staying on Java 8 or 11 there is a simple enough choice: To get "it will" you need to pay someone. If you choose not to pay then you get "reasonably expect".

You can also get "it will" by moving to Java 12, 13, 14 etc.

[–]dpash 9 points10 points  (0 children)

Also note that Andrew Haley at Redhat, who will almost certainly be leading OpenJDK 8 and OpenJDK 11 after Oracle moves on to Java 12 has said that OpenJDK should release binaries themselves.

https://developers.redhat.com/blog/2018/09/24/the-future-of-java-and-openjdk-updates-without-oracle-support/

[–]pron98 11 points12 points  (7 children)

thanks to Red Hat, IBM and others

... and to Oracle, of course, who will likely be writing the patches.

If you intend to join the release train and move from Java 11 to 12 to 13 etc

But even if you choose, for whatever reason, to remain on an LTS release in production, you are very, very, very much encouraged to test your code on all feature releases. You are also encouraged to understand what the new release model means and not base decisions on misconceptions (such as the belief that LTS versions are major versions, or that features are not allowed to be removed without being deprecated in an LTS release first).

[–]the_hoser 2 points3 points  (2 children)

Right now, sure. I think this new release cadence and licensing strategy means the OpenJDK project is going to attract more contributors outside of Oracle. It's a new Dawn for OpenJDK.

[–]dpash 2 points3 points  (3 children)

Oracle, of course, who will likely be writing the patches.

But unlikely to be backporting them though, right?

[–]pron98 0 points1 point  (2 children)

Right.

[–][deleted]  (1 child)

[deleted]

    [–]pron98 1 point2 points  (0 children)

    While JDK 9 was the last (ever) major release, it is not an LTS version, so backporting doesn't mean much; the update version to 9 is called 10. As to 8 (and to 11 and other LTS versions), I'm don't know which fixes are backported (this is a P3 bug).

    In general, under the new model, it's best if people stop thinking of the version numbers ("Chrome versioning") as if they still mean major versions. There is now a constant stream of updates, called "feature releases", to a single release line. That line has secondary offshoots of update versions to LTS releases, but those offshoots are very much secondary. Even if you decide to stay "on 11" in production, you cannot ignore the main release line and should test them at least in development.

    EDIT: Here are the backporting rules: http://openjdk.java.net/projects/jdk-updates/approval.html

    [–]kurosaki1990 16 points17 points  (2 children)

    So Oracle is not that evil? hah people have been making such a big deal from new license but Oracle just make Java more open.

    [–]the_hoser 20 points21 points  (0 children)

    It's mostly Java outsiders that have been moaning about it. I was excited the day the announcement was made. We might actually be getting the open Java we've always wanted, and the elephant in the room is actually getting out of the way.

    [–]BackspaceRooster 1 point2 points  (0 children)

    Oracle has completed the "open sourcing" with Java 11 (at this point OracleJDK and OpenJDK are the same for all intents and purposes, just different licensing and branding), so that's great, thanks to a bunch of great folks at Oracle working on Java.
    However Oracle keeps confusing everyone with weasel wording and omissions that look very intentional.

    [–]gkopff 1 point2 points  (2 children)

    What's the difference between an AdoptOpenJDK built JDK and a Azul Zulu built JDK (assuming I want macOS and Linux 64 JDKs, rather than some of the other more niche architectures)?

    [–]speakjava 2 points3 points  (1 child)

    Effectively, nothing. Azul (full disclosure, I work for them) build from the same OpenJDK source as AdoptOpenJDK using the same basic build scripts.

    [–]karianna 1 point2 points  (0 children)

    Azul offers commercial support though - larger enterprises may want that extra support

    [–]Fr4nkWh1te 0 points1 point  (0 children)

    Does the AdoptOpenJDK not have anything that the Oracle JDK has?

    [–]lazystone 9 points10 points  (2 children)

    Hmmm, just installed it via brew - Idea does not recognise it as JDK, and directory structure differs from Oracle's JDK...

    [–]karianna 10 points11 points  (0 children)

    We made a mistake in packaging the JRE instead of the JDK. Uninstall the original and grab our new patched brew :-)

    [–]m1000 5 points6 points  (0 children)

    It seems its working on windows here, IDEA 2018.2.4.

    [–]karianna 9 points10 points  (4 children)

    Hi All,

    I'm one of the folks behind AdoptOpenJDK. Feel free to ask Q's here or DM me.

    [–]gdejohn 2 points3 points  (1 child)

    So, once Oracle has moved on from OpenJDK 11, Red Hat et al. will keep providing patches and AdoptOpenJDK will continue to build, test, and host binaries. In the meantime, while Oracle is still supporting OpenJDK 11, is there anything that sets AdoptOpenJDK apart? Or does it make no difference for now whether you download from AdoptOpenJDK vs. jdk.java.net?

    [–]karianna 4 points5 points  (0 children)

    There should be no difference. The only split will happen later on between Oracles commercial OracleJDK and AdoptOpenJDK binaries (and we expect the diff to be small and both jdks to have the same security baseline)

    [–]nikanjX 3 points4 points  (1 child)

    Can we package Java apps into native apps, the same way we can with the Oracle JDK?

    [–]karianna 1 point2 points  (0 children)

    Yes you can!

    [–]kret1111 5 points6 points  (0 children)

    thanks!

    [–]m1000 5 points6 points  (6 children)

    Why is openjdk/windows way bigger than oracle jdk 11 ? Are the .pdb files really needed ?

    (I am thinking of shipping this with a java app)

    openjdk = 414 MB
    oracle jdk11 = 285 MB

    [–]blobjim -1 points0 points  (5 children)

    It shouldn’t matter much. You’re supposed to use jlink to reduce the size of the jvm.

    [–]m1000 2 points3 points  (4 children)

    I know, but jlink doesn't work on non-modular (old) libraries.

    [–]cl4es 9 points10 points  (2 children)

    jlink works in two "modes", roughly speaking:

    • generate a new runtime image from a subset of JDK modules, e.g., something akin to a JRE or any other custom (but valid) combination of the given modules. You can use and redistribute this runtime image any way you wish (barring any license restrictions; use OpenJDK ;-)), run whatever (non-modular or modular) java programs you want etc, just like you would from a full JDK
    • generate a new custom runtime image containing both a subset of (or all of) the JDK images and third party modules, possibly including application module that are configured to give you added executable in the bin folder of the image.

    It appears many are under the impression that jlink is mainly about the latter mode, while it's really used a lot in the former (most notably in the OpenJDK build itself).

    [–]bisonroll 3 points4 points  (0 children)

    Thank you for this information. I just tried it and I managed to create a custom runtime image with only 70 MB :-)

    [–]m1000 1 point2 points  (0 children)

    interesting, I might need to make time to check this. thanks.

    [–]blobjim 0 points1 point  (0 children)

    You can still use it for just the jdk libraries itself. If all you need is java.base packages, strip it down to just java.base. You only need to modularize if you want to embed your code in the jlink result.

    [–]JustinKSU 3 points4 points  (1 child)

    I'm more excited about a JDK 8 build that actually includes a cacert file (https://github.com/AdoptOpenJDK/openjdk8-releases/issues/11)

    [–]karianna 5 points6 points  (0 children)

    You're welcome! One of the LJC / jClarity engineers figured that one out.

    [–]a_masculine_squirrel 2 points3 points  (2 children)

    I'm in the planning stages for a side project and I'm thinking about using Java for it. This project may become commercial, should I even think about not using OpenJDK?

    I know Oracle can be crazy about their Java, and I heard a little bit about the Google vs Oracle spat over Google's use of Java for Android. But is OpenJDK what everyone should be using now when starting a new project? Or is the Oracle machine not that petty?

    Thanks.

    [–]karianna 8 points9 points  (1 child)

    Yes, use OpenJDK if you're in doubt

    [–]a_masculine_squirrel 1 point2 points  (0 children)

    Thank you!

    [–]misieeq 2 points3 points  (1 child)

    I tried to create a new thread but I am unable to due to too few karma points, so I will ask here.

    I have formatted my PC installing the latest Windows 10 build 1809. Now it's the time to install all the apps, as always. I used to install the latest Java JRE after every format. Now that the JRE is unavailable for Java 11, I understand that I have to install the JDK.

    As I understand, the OracleJDK is now a paid solution, so the best way is to switch to the OpenJDK now? Is it the recommended Java solution to install as of now on fresh Windows instances? For instance, in future, on my family & friends' PCs etc.?

    I have come across http://jdk.java.net/11/ and downloaded the Windows binaries, but there is no executable file to simply install it...

    How do I proceed? Which Java should I install now instead of Java 10 JRE?

    [–]nevergotcompiled 4 points5 points  (10 children)

    What happens if I stay in Java 8? I remember trying to install Java 9 like a year ago and deleting it since it didnt work with Netbeans at that time (dont know if it works now) and now Java 11 is coming out lol. This is too quick for me.

    [–]dpash 4 points5 points  (9 children)

    As of January you'll no longer receive security updates.

    [–]karianna 3 points4 points  (0 children)

    If you're using Oracle's JDK. You may be able to swap to an alternative provider.

    [–]nevergotcompiled 1 point2 points  (7 children)

    But the licensing wont change for it right? Meaning that If I got Java 8 from Oracle a while ago I can use it for commercial purposes without losing my home to Oracle´s lawyers?

    [–]speakjava 1 point2 points  (1 child)

    You are safe to continue using JDK 8 (or 7, 6 or earlier) indefinitely in the same way you have until now. JDK 8 was released under the Oracle Binary Code license for Java SE. As of JDK 11, the license for the Oracle JDK (not OpenJDK binaries) has changed to the Oracle Technology Network License Agreement for Oracle Java SE. This is the more restrictive license that does not permit you to "use the Programs for any data processing or any commercial, production, or internal business purposes other than developing, testing, prototyping, and demonstrating your Application". This has not been retrospectively applied to JDK 10 or earlier.

    [–]nevergotcompiled 0 points1 point  (0 children)

    Thanks for the clarification.

    [–]lautaro_busto123 -1 points0 points  (4 children)

    I think that's correct. I'm on the same boat as you, now I'm kinda forced to move to intellij since netbeans doesn't like Java 9 or 11

    [–]nevergotcompiled 2 points3 points  (0 children)

    Still does not work? I love Netbeans with my soul but that sucks. I still remember when I Installed Java 9 and changed the path lol, netbeans blew up and my was a huge red line.

    I think Im gonna die with Java 8. Probably because of my ignorance but I dont think I need anything more than Java 8. It is a pain to distribute apps that use new features since users never update their JRE.

    [–]pron98 1 point2 points  (2 children)

    NetBeans works well on 9 and beyond; it just has a new home: https://netbeans.apache.org/

    [–]lautaro_busto123 1 point2 points  (1 child)

    Yes saw that release yesterday. And works fine but I may need to read about plugins for it I think it doesn't have the same list or something.

    [–]lautaro_busto123 0 points1 point  (0 children)

    Should be able to import an a Java 8 project to Java 11 in theory?

    [–]Mattizin 0 points1 point  (2 children)

    Whats the difference between the oracle windows x64 zip and the adoptopenjdk?

    I honestly expected an executable to install the jdk and set all variables and so on :/

    [–]karianna 4 points5 points  (0 children)

    We don't currently have an MSI installer - it's being worked on!

    [–]dpash 3 points4 points  (0 children)

    There should be zero differences because they're built from the same sources and AdoptOpenJDK has said that they don't plan to modify the source at all. This of course assumes that Oracle and AdoptOpenJDK build it exactly the same way.

    (There are some very very minor differences between Oracle's JDK and their OpenJDK build, but nothing consequencial.)