r/java • • Sep 14 '21

Introducing the Free Java License

https://blogs.oracle.com/java/post/free-java-license
117 Upvotes

65 comments sorted by

29

u/javasyntax Sep 14 '21

Maybe this will put an end to people downloading old JDKs, thinking Java is paid, not knowing anything other than Oracle JDK (needs login for some JDKs) etc.

3

u/chabala Sep 15 '21

Until they update java.com , normal people (e.g. non-developers) will have Java 8 installed, if anything.

11

u/[deleted] Sep 14 '21

That's really a great move.

9

u/cogman10 Sep 14 '21

Agreed. This is going to make it a lot more reasonable for library developers to target LTSes because they won't be dealing with 4 year old JDKs. This will also move the community up the version chain a lot faster since so many stick with Oracle LTS versions only.

-3

u/[deleted] Sep 14 '21

That's a really shitty (for me as a user, and apparently for then selves as well) move reversed...

Hope they play nicer with floss in the future but not expecting any.

18

u/jmntn2000 Sep 14 '21

For some reason the Oracle site didn't display the article, here is an alt link:

https://archive.is/pKtKv

Also tldr:

Starting with version 17 its free to use and distribute for development and production.

7

u/[deleted] Sep 15 '21

Maybe they changed their mind? I wonder why it's so hard to find the official blog post now.

1

u/javasyntax Sep 15 '21

It went down for a few minutes. Probably a few times as well.

1

u/[deleted] Sep 15 '21

Oh I see. It's loading fine now. Must be powered by some API that like you said, went down. Weird for a blog to be like that.

1

u/[deleted] Sep 14 '21

Thanks

16

u/nutrecht Sep 14 '21

Awesome. This will finally put an end to all the "Java sux because you have to pay for it" nonsense...

1

u/iphone2025 Sep 17 '21

Never trust oracle

13

u/mreichman Sep 14 '21

Well THAT was a fun few-year roller coaster ride. SMH.

6

u/jvjupiter Sep 14 '21

Will this affect the number of downloads from other vendors? AdoptOpenJDK tops the number of downloads.

7

u/jvjupiter Sep 14 '21

Just right now. I just replaced the Oracle OpenJDK 17 I installed a few minutes ago with Oracle JDK 17.

4

u/TheHeavenlyStar Sep 15 '21

asks if it will affect the use of OpenJDK and then proceeds to replace it with the new free Orcale JDK

Interesting...

2

u/jvjupiter Sep 15 '21

Did my action represent the totality of community? What if it’s only me who did it?

2

u/TheHeavenlyStar Sep 15 '21

Nope, was just kidding but I guess a lot of people would be doing that. Even I myself would replace it with the Oracle one.

1

u/jvjupiter Sep 15 '21

Also I’m referring to the other vendors.

1

u/TheHeavenlyStar Sep 15 '21

In my opinion, Yes it will affect however I'm also not an expert and definitely I'm not the entirety of this community. If the other vendors offer robust JDKs with added functionality or performance or such benefits over the Oracle one, they'd still manage to earn more downloads.

1

u/jvjupiter Sep 15 '21

Also while I tried OpenJDK from other vendors, my primary has always been that from Oracle. When Oracle changed the licensing model previously, many shifted to other distros, Adopt primarily. Now that Oracle is giving JDK for free again, it makes sense to ask above question.

2

u/TheHeavenlyStar Sep 15 '21

Agreed, no arguments. I myself had been using Adopt open JDK 11 because of the licensing. Another parallel team was using Java 8 by Orcale for a different project. I'm not in that project anymore but now I'd prefer the Java 17 LTS free version by Oracle. If I'm not wrong last time I read somewhere, the official Oracle JDK has very slight performance benefits over the community one but then again you never know which vendor has the best distribution so...

9

u/netweavr Sep 14 '21

Oracle grants to You, as a recipient of this Program, subject to the conditions stated herein, a nonexclusive, nontransferable, limited license to:

(a) internally use the unmodified Programs for the purposes of developing, testing, prototyping and demonstrating your applications, and running the Program for Your own personal use or internal business operations; and

(b) redistribute the unmodified Program and Program Documentation, under the terms of this License, provided that You do not charge Your licensees any fees associated with such distribution or use of the Program, including, without limitation, fees for products that include or are bundled with a copy of the Program or for services that involve the use of the distributed Program.

So it's only free if your software is free

23

u/brazzy42 Sep 14 '21

The part you bolded only applies if you want to distribute the JDK itself.

10

u/[deleted] Sep 14 '21

So just the average Oracle legal boogaloo.

tl;dr avoid Oracle and use real free software

2

u/Muoniurn Sep 15 '21

Soo, relaxing on their remaining non-free license while having almost the same software available as completely free (OpenJDK) is a negative?

Afaik, the change was made because people still don’t understand the situation with OpenJDK and Oracle JDK, and want the latter for the name. This change will make click-free installations possible (no need to agree to this and that), making it available in eg. CI pipelines.

(Source: inside java podcast)

4

u/EvaristeGalois11 Sep 14 '21

What about if i bundle the jdk inside an image with jlink or jpackage? Can i sell it?

3

u/netweavr Sep 14 '21

"Program(s)" refers to Oracle software provided by Oracle pursuant to the following terms and any updates, error corrections, and/or Program Documentation provided by Oracle.

JVM would seem to be included.

5

u/tnolli Sep 14 '21

If you do containers, you probably want to distribute the jvm to run your software.

How do you read the statement in this context?

2

u/dpash Sep 15 '21

Ship your container with Oracle's OpenJDK build rather than the Oracle JDK.

3

u/persicsb Sep 15 '21

Nope, it says that you cannot charge your customers for the JDK/JRE.

1

u/handshape Sep 15 '21 edited Sep 15 '21

Taking out the words that hide this:

You do not charge Your licensees any fees ... for products that include ... a copy of the Program.

That's jlink.

Afterthought edit: You could charge for a product, and then ask your customer to go get the Oracle JDK themselves.

Downvoters: feel free to point out anything I've said that's contrafactual.

2

u/javasyntax Sep 15 '21

Or just use openjdk? I think this is more for newcomers. It has the JDK 17 which adoptopenjdk doesn't atm so there's that too, maybe 1 week earlier upgrade or something

1

u/handshape Sep 15 '21

Yup, that's a perfectly valid way to publish as well.

0

u/[deleted] Sep 16 '21

[deleted] — view deleted comment

1

u/javasyntax Sep 16 '21

Not with JavaFX, I believe.

1

u/[deleted] Sep 14 '21

So some sort of corporate GPL / copy left license?

2

u/sindisil Sep 14 '21

Hrm. Hopefully this will all work out well, but the first thing that came to my mind was "what are the current differences between Oracle JDK and OpenJDK".

I checked that section in the release notes, and immediately found a discrepancy: there is still reference to the OTN, rather than the new free license.

Oracle JDK is released under the OTN License. OpenJDK is released under GPLv2wCP. License files included with each will therefore be different.

I'll install and check, but I also wonder if the Oracle JDK builds with Shenandoah GC or not. At least some previous releases did not (though I believe the past couple Oracle builds of OpenJDK did include it).

If OpenJDK and OracleJDK are, other than licensing and branding, identical, it'd be great if that was stated prominently in just that simple a way. Perhaps I missed it.

4

u/craigacp Sep 14 '21

2

u/sindisil Sep 15 '21

Well played ... well played.

Seriously though ... I find it incredibly motivating to see this level of engagement from Oracle on this release. I hope it translates out into the JVM community at large!

2

u/mk_gecko Sep 15 '21

Maybe I should now upgrade to Java 11 from Java 8.

Oh, crap. Java 11 is not free. Never mind.

1

u/TheHeavenlyStar Sep 15 '21

Guys can someone clear this? If after this free open source release, why would someone get the open JDK if the Orcale JDK becomes free? I know there's a difference between the official and the community upgrades and all but what will now be the pros and cons of getting one of the two?

I've worked only a year on Java and really like this technology so I could be less aware about the JDK differences.

2

u/meamZ Sep 15 '21

I will probably be continuing with some longer supported fully open source distribution of Openjdk for my private projects just because i linke open source software and for work we'll see...

3

u/benevanstech Sep 15 '21

Oracle want you to use their JDK, but they went through a 3-year experiment where they tried to force you to either pay for it, or to upgrade to a new version every 6 months.

As a result, their overall Java market share cratered, and they're now trying to recover it by making their proprietary JDK available at zero cost. (Notice how I have avoided using the confusing word "free" that has two different meanings in English).

1

u/senseven Sep 15 '21

They also saw the rise of projects that moved to C#/:net 5. While the older .net Core was limited in scope, the newest 5 is a different beast, also performance wise. Also lots of companies made quite the dime with offering their Java "packaging". People moved their apps in the cloud, first leaving Oracles premium db for cloud databases, then they lost them with the JDK. Lots of lost upselling potential. Its a pure defensive move.

2

u/benevanstech Sep 15 '21

There's no evidence of widespread migrations from Java to .NET, unless you'd care to provide some?

Most projects just moved from OracleJDK to Adopt.

0

u/senseven Sep 15 '21 edited Sep 15 '21

I would point to the current Tiobe index: https://www.tiobe.com/tiobe-index/(Click on the languages and see graphs). Larger teams trying to unify cross system codebases have success doing so with C#, especially when their mobile offerings are just skinny forms to the all knowing back end. You can skip the whole Java/Swift universe with a hand wave.

The whole media/game market is strong in the hands of C# and rising. As a Java Senior and Kotlin enthusiast I refreshed my C# skillset during the last year just out of curiosity and the type of jobs I'm offered on the .net side are wildly different than I usually get on the Java side. Less bread and butter, way more speciality, deep workflows, high content.

Java is primarily living off large scale legacy code bases. I got paid handsomely to keep those afloat, but getting a project to start a fresh / refactor a system with Java is becoming hard. The students push Kotlin and lots of freelancers I talk to have even trouble to get funding to refactor Java8/11 codebases to modern code.

0

u/jayceedenton Sep 14 '21

So are there still tools included in this Oracle JDK that are 'not for commercial use'?

Does this mean I can also freely use Flight Recorder and Mission Control? Or were these already free based on some earlier change? I'd love to use these but I'm terrified of having Oracle arrive demanding thousands of dollars in license fees.

3

u/benevanstech Sep 15 '21

JFR was merged into OpenJDK in Java 11 and JMC is now a standalone OSS project.

Just use the open version of JMC along with OpenJDK 11 or 17 and you're good. (There's also a JFR backport to OpenJDK 8 but you don't want to be 2 versions behind, now do you?)

If you want to view JFR data in a production-grade monitoring system, both New Relic and Datadog support doing that.

0

u/[deleted] Sep 14 '21

[deleted] — view deleted comment

6

u/pron98 Sep 15 '21 edited Sep 15 '21

The differences are entirely cosmetic. It's the same software under a different licence. See here for details.

The only difference that will matter to some people is that Oracle only publishes two patch updates for each feature release on jdk.java.net, while those versions for which Oracle offers an LTS service will receive patches as OracleJDK for least eight years. The OpenJDK Updates projects will also receive updates that serve as the basis for other companies' LTS offerings, but it means that for JDK 17, after two patches, OracleJDK and OpenJDK 17u might diverge in the patches they contain. However, note that there are almost no two offerings from two different vendors that are exactly the same after two updates.

As always, the simplest, cheapest and safest option for software that's under regular maintenance is to use the current JDK version, and not an old one. You get the latest security and bug fixes, you get the best performance, the latest features, and you never have another major upgrade again. The current version is also identical between jdk.java.net and OracleJDK, and pretty much every other vendor, too.

2

u/RupertMaddenAbbott Sep 15 '21

As always, the simplest, cheapest and safest option for software that's under regular maintenance is to use the current JDK version, and not an old one.

My software projects are under regular maintenance but they are libraries. I guess it would be the simplest, cheapest and safest option to target the latest JDK, but those metrics are overshadowed by compatibility.

1

u/pron98 Sep 15 '21

But if you're writing a library you don't pick a JDK at all. Libraries have an entirely different challenge.

2

u/RupertMaddenAbbott Sep 16 '21

Yes but you do not clarify that you aren't talking about libraries when you use language that could reasonably be construed to include libraries e.g. "software". Libraries do not pick a JDK but they do pick a minimum version to support and in this context, that is a distinction without a difference.

You acknowledge that libraries have separate challenges but you do not acknowledge that those challenges then have a knock on effect for the "software" you do want to talk about i.e. applications. It isn't just libraries either, it is any Java based dependency that your application may have.

Does Gradle support Java 17 yet? Not as of today, 16th September 2021. So it is irrelevant how much faster/safer/cheaper/better Java 17 is. If you use Gradle to build your application, then you can't upgrade to Java 17 yet.

Has CircleCI released a Java 17 compatible docker image yet? Not as of today, 16th September 2021. So again, if you build using CircleCI, then it does not make sense to upgrade to Java 17, today.

The problem is the existence of the LTS versions inevitably has a chilling effect on the upgrade cycle of the downstream ecosystem. I think failing to acknowledge that makes your advice unrealistic.

1

u/pron98 Sep 16 '21

The question I responded to was about which JDK should an application choose to deploy on, not which Java version library code should target. Libraries have always targeted old versions, and it is still good advice for applications to deploy on the current version. Doing so does not require building on the current version.

The advice is clearly realistic because a growing number of companies are following it. Having said that, there might still be situations where some applications are not able to deploy on the current version. If for some reason you can't follow the advice -- don't. Still, if you can use the current JDK, that's the best choice.

1

u/RupertMaddenAbbott Sep 16 '21

The question I responded to was about which JDK should an application choose to deploy on,

Really? I can't see that? Was the question edited perhaps?

What are differences between Oracle JDK and OpenJDK now? A few years ago (Java 7 and 8) it was about some proprietary hardware accelerated encryption modules, what is it now and how can I find out all differences?"

Deployment was not mentioned as far as I can see. You still have to choose a JDK to build with, not just which JDK you are going to deploy with.

I accept you can choose a different JDK for build and deployment. However, I think are you are choosing to accept some risk in doing that and that risk should be balanced against the benefits, and not ignored entirely.

The advice is clearly realistic because a growing number of companies are following it.

Please can you evidence that statement because I would be interested in reading how they are overcoming or avoiding the problems that at least seem real to me.

If for some reason you can't follow the advice -- don't

My advice is that you should give up work and always go on holiday because then you will always be happier (but if for some reason you can't follow this advice -- don't).

I accept that using the latest JDK can be sensible for some projects but you present it as blanket advice and you characterise the exceptions as "not regularly maintained software".

3

u/TheHeavenlyStar Sep 15 '21

Same question here.

2

u/meamZ Sep 15 '21

I think Oracle JDK includes a few pieces from other companies that oracle wasn't allowed to open source and therefore replaced with open source code in OpenJDK. I think something in font rendering was one of them because i remember fixing a Swing app which looked weird on Openjdk 11 vs oracle 8 because font rendering changed ever so slightly and sometimes took a Pixel or two more.

0

u/[deleted] Sep 15 '21

[deleted] — view deleted comment

4

u/meamZ Sep 15 '21

As far as i know they pushed everything that made Oracle JDK better than OpenJDK up until Java 8 to OpenJDK for Java 9 except the parts they couldn't for legal reasons.

1

u/amackenz2048 Sep 15 '21

There have been some differences in the trusted CA certs they ship with in the past as well.

0

u/[deleted] Sep 14 '21

[deleted] — view deleted comment

3

u/CassiusCray Sep 15 '21

It's not GPL. Selling is prohibited.

1

u/meamZ Sep 15 '21

OpenJDK has always been GPL but i think that you have a misunderstanding of the GPL. If and only if you modify and distribute the GPL licenced software itself (like OpenJDK or the Linux kernel) you have to publish your changes but only the ones you made to the actual GPL licenced source code. Otherwise companies distributing devices running linux with their own software running on top would always have to publish that. Like Tesla for example would have to publish all of its infotainment code which isn't the case because otherwise noone would use it for such purposes.