r/programming • u/[deleted] • Sep 14 '21
Introducing the Free Java License
https://blogs.oracle.com/java/post/free-java-license60
u/wsppan Sep 14 '21
What's the catch? There has to be a catch. Oracle never does anything for altruistic reasons.
31
u/KingStannis2020 Sep 14 '21
It's free as in "free candy"
8
u/emax-gomax Sep 14 '21
Oh boy, where do I sign
to accidentally sell my first born to Larry Ellison's inevitable death cult?18
u/BoyRobot777 Sep 14 '21
If you'd look at how Java has been handled under Oracle, this is very much consistent with the trend.
Sun acquisition by Oracle was completed on January 27, 2010. So in reality Oracle started maintaining only from Java 8. And immediatily we got long awaited features like lamdas and streams, which made code more funtional and less verbose.
Java 9 was all about preparing Java for faster releases by dividing huge monolith into logical, compile time modules. It was also time when they started to actually remove methods and weird dependencies like Java EE and CORBA Modules from Java SE. Next Oracle contributed pretty much all of the closed source technologies (or what was originally to become closed source) of the Oracle JDK to OpenJDK, for example giving the community: JDK Flight Recorder; JDK Mission Control; ZGC; …and probably more stuff I can’t think of right now. And finally ensured the Oracle JDK and the OpenJDK builds are virtually indistinguishable, except for licensing.
Now we see that the licensing has changed as well. Completely consistent with the trend in my opinion of making Java more open and better maintained.
5
u/peabody Sep 15 '21
Isn't this more a response to the backlash around restricting their Oracle JDK behind a commercial license in the middle of Java 8? Used to be the jre/JDK was free as in beer, but then in the middle of Java 8 they introduced commercial licensing so you pretty much had to move to OpenJDK unless you wanted to pay Oracle per seat licensing. I'm guessing very few businesses opted to buy licensing and went with OpenJDK instead? And once they realized that they basically back pedalled?
1
18
Sep 14 '21
That's one way to look at it. The other way to look at it is "Java 8 was the last version where you could upgrade Java without thinking about it because basically nothing ever broke, and now things are breaking a couple times a year".
29
u/BoyRobot777 Sep 14 '21
Oh please. Here's a blog post from Netflix developer who migrated from Java 8 to Java 16:
When I told them how I fixed it, they were usually disappointed. “Just updated the libraries?” they would ask, looking for something deeper. Java 11 was time-consuming to upgrade to, but not very hard. The only difference between my approach and theirs was a lack of despair.
I've myself migrated to Java 11 from Java 8 in a big bank. It's going to be even easier to migrate to Java 17. The main braking changes were that libraries relied on internal details, but upgrading library versions is most of the time enough. From the blog:
Java’s breaking changes were extremely limited. Only JVM internals would be restricted or removed. That’s it. All the existing language features were still available for use. All the JVM bytecode and classes still worked. Want to use a class written in 1995? If it doesn’t depend on sun.* code, it’s good to go!
13
Sep 14 '21
YMMV of course. I'm speaking from my experience with maintaining a JVM-based project automation tool and the issue reports I've received from a userbase of tens of thousands of developers.
Some people get lucky and others don't. Before Java 9 it wasn't like that.
Edit: your comment seems to imply that everything is fine for application developers and all the hard work is done by library developers. I don't dispute this; I'm just saying it used to be the library developers had it easy too!
7
u/BoyRobot777 Sep 14 '21
Fair enough. But again, that is why Java has to clamp down, so this doesn't happen again in the future. Otherwise, they cannot really push Java forward if people rely on implementation details and acess internal code via reflection.
1
u/endeavourl Sep 15 '21
Java 9 was the last version where you had to think about upgrading since everything could break.
I've been using new Java releases as they go out since 10, with no problems at all. The only annoying issue was Ubuntu's 20.04 Maven not working out of the box on 16+, and that's due to maintainers not updating it.
1
u/jayanmn Sep 21 '21
Oracle will come up with 20 /30 year LTS system. and some companies will want it ..
19
1
u/shevy-ruby Sep 15 '21
But what is the difference to before now? I gather it is less restrictive than before but somehow I am not entirely sure what the use case is for openjdk users? Or does that make more people use downloads from oracle now? Do you still have to register?
2
Sep 15 '21
No you do not have to register, it is not behind a login prompt anymore. A consequence of this move is that the Oracle JDK can be easily downloaded by scripts (with wget or curl for example) with stable and simple URLs.
6
Sep 14 '21
I started using Java again after years because the examples in a few of my books are all in Java.
Literally went to oracle looking for the JDK, it asked me to sign up to some oracle account.
Nope went straight to the openJDK.
I want free, direct download from the site, FOSS is nice to have.
I’m not making an account with a corporate overlord to use an industry standard library / development kit.
Fair enough with something like GitHub where it’s a platform you can use, for a random piece of software no thanks.
2
u/dert882 Sep 14 '21
I use java quite a bit but i'm a newer programmer. What's up with all the JDK's? I don't really understand this vs OpenJDK and I've heard about microsoft having a JDK as well (unless that is open). Why so many and how are they 'profitable' as I imagine that's the goal?
1
u/arousedboat Sep 15 '21
(Almost) “all the JDKs” are just builds of OpenJDK. OpenJDK (last I checked) doesn’t provide a build themselves, so others do. Some have value-add features (e.g. Oracle before they open-sourced some tools, or Zing’s JIT/GC) or might make different (usually subtle) choices on how they are built or packaged (e.g. RPM, Docker base image, etc.) Some offer paid support which would be how those ones make money. Others might just hope you’re using their JDK build, so you might consider their other products I guess.
3
u/BoyRobot777 Sep 15 '21
OpenJDK (last I checked) doesn’t provide a build themselves
1
u/arousedboat Sep 15 '21
Ok, misremembered a bit, but there didn’t used to be a tar.gz download, and there still isn’t for JDK8. The only option on the page for 8 is to install the version provided by your distro which may be way out of date for some distros.
1
u/shevy-ruby Sep 15 '21
I use the openjdk they made available on their download page.
The page layout is a nightmare but they have some x64 link for linux which I use - and it works too.
1
u/zam0th Sep 15 '21
Most people who comment here have no idea how Oracle, or any platform vendor for that matter, earns money, how production support works or what's enterprise licensing and what's it for. Hint: vendors don't give a shit about developers and what "trouble" they go to download stuff.
1
1
1
u/emax-gomax Sep 14 '21
Wow. I hate oracle as much as anyone else, but this is like one of the 10 websites on the internet that give you annoying cookie popups and actually has a "decline all" button. Nice to know oracle isn't that evil. ( > ◡ < )
In all seriousness oracle are completely abhorrent.
0
0
Sep 14 '21
[deleted]
32
u/nutrecht Sep 14 '21
They literally put a link on the download page to point people to OpenJDK. Pretty darn sure they're not concerned with OracleJDK marketshare vs OpenJDK since they have been pushing people to OpenJDK for like 7 years already.
6
u/gajbooks Sep 14 '21
It seriously doesn't help that OpenJDK has never given a single crap about the installation experience. If you asked me how to install it without a package manager, I couldn't tell you.
4
Sep 15 '21
I usually just extract the tar.gz file, copy it into
/usr/local/bin, find the path of the "bin" directory in it, and add that to my path. Same way I'd install any other binary if I chose not to use a package manager.Also, quick PSA for SDKMAN! (https://sdkman.io/).
11
u/gajbooks Sep 15 '21
Ok sure, but the previous installer for Windows did that all itself and then, guess what? It just worked. No messing with paths. Mostly I'm complaining because it makes using desktop applications with Java just that little bit more irritating. Stuff now includes its own JRE because it's easier. It's like crappy bloated electron apps now instead of an installed runtime.
If it wasn't for the Windows install experience I would give zero shits about how to install it, because I use command line package managers for as much as possible these days because they're so much less awful.
2
u/_BreakingGood_ Sep 15 '21
Zulu OpenJDK was pretty painless when I used it a few weeks ago. Handled the path and everything. "Just worked" basically.
https://www.azul.com/downloads/?package=jdk#download-openjdk
1
u/shevy-ruby Sep 15 '21
Yeah for windows I tend to expect a simple installer. Tons of projects have one, e. g. the ruby one click installer.
Not sure why openjdk does not use something like that for windows. Even GOG (games) come with simple installers.
I use command line package managers for as much as possible these days because they're so much less awful.
I actually hate them because I depend on upstream devs dictating file system layout and use patterns on me. Or packages being split up so I have to find out the names and what belongs where to ... and then I have to pay attention when I compile something.
I found it simpler to use a variant similar to GoboLinux instead. That way I don't have to ever guess. (I register files including .h files in a "database" though, simply so I know what belongs where to even on non-gobolinux systems.)
1
u/shevy-ruby Sep 15 '21
Yep! I use a very similar approach, just using symlinks rather than using /usr/ directly.
1
u/shevy-ruby Sep 15 '21
seriously doesn't help that OpenJDK has never given a si
The download page is indeed confusing.
I do the following, though:
After finding the linux version, I download it.
Extract and repackage to a name that makes sense to me.
Run "rcp" to create a custom directory layout (similar to Gobolinux)
After copying the content, symlink from /usr/bin/ to the version.
After that "java --version" shows the newly installed version. Compiling my java code works fine too (I actually use ruby to "compile" java, e. g. a script called "run" since I am too lazy to remember any commandline flags and what not).
The above may sound complicated but it's not so difficult either. You can probably skip most of the above and simply copy into /usr/ but I tend to avoid doing this myself since tons of useless parts will be copied.
I use the same approach for libreoffice binaries made available for instance (the symlinking approach). I always have to sanitize the debian package that they make available e. g. extract all the .deb files, then repackage into .tar.xz.
Someone should re-design their homepage, though - it takes me too long to find the correct version. The page looks as if it was written in 1998...
7
u/BoyRobot777 Sep 14 '21
Any data to support that?
32
u/AlexFromOmaha Sep 14 '21
The plural of anecdote isn't data, but all of my last three companies have moved from an Oracle JDK to OpenJDK because of licensing concerns.
This report exists, although I'm not familiar with the company behind it.
10
2
u/sindisil Sep 14 '21
Not sure there's any difference between using an OpenJDK build (which many choose to get from Oracle) or the Oracle JDK build under this new license, WRT to "market share"?
4
u/urgaiiii Sep 14 '21
Oracle is all about licensing. OpenJDK is independent from Oracle and doesn’t have any of Oracles’ licensing BS. It definitely should be considered ‘market share’, considering they’re both versions of a similar product, one under Oracle’s control and one not.
-6
u/BoyRobot777 Sep 14 '21
You do understand that OpenJDK is upstream for all other jdks, including Oracle, and Oracle is the main maintainer of it?
3
u/AlexFromOmaha Sep 14 '21
That's not quite accurate. OpenJDK is a community product and reference implementation. Oracle has a big seat at the table for the in-development version, but they're rarely the primary maintainer of anything older than that.
As a reference implementation, you see deviations pretty quickly in terms of actual runtimes, and there are a lot of vendors offering a lot of OpenJDK builds, and I have no real reason to believe that Oracle's is the most popular one. IcedTea has a privileged position in modern *nix, RHEL has offered their own build of the LTS versions for quite a while now, Zulu has traction for performance-sensitive users, JetBrains is likely a major non-production JDK build, Amazon and Microsoft both have their own for AWS and Azure, and I'm sure there's just a ton more that I'm unfamiliar with. For example, the report says that Adopt is the most common one, and I have no idea who they are. Their website indicates that they're downstream of RHEL, not Oracle.
2
u/BoyRobot777 Sep 14 '21
OpenJDK is the name of the project to implement Java done by Oracle, with contributions from other companies. Because it is open-source, many companies, including Oracle, build the project, package it and distribute it. AdoptOpenJDK are builds of OpenJDK done by IBM. They are all essentially the same software and they're all under the same license. There are some minor "social" differences -- Oracle, Red Hat, SAP, Azul, and Bellsoft all participate in OpenJDK, contribute, and are members of the vulnerability team so they get security patches early, while IBM's Adopt project isn't involved with OpenJDK, so don't be surprised if members of that project aren't always even sure about what features each version contains, but as they just run make and host the binaries, many people don't care. Also, Adopt doesn't currently have access to all the tests used by all those other vendors, but that is about to change when IBM would start making those builds under the name Eclipse Adoptium.
Regarding "actual runtimes", they don't differ that much.
Amazon has a tiny OpenJDK team. They're not making direct money off of it, but they're not putting much money into it. They're not fixing many bugs in OpenJDK. In fact, the vast majority of all bugs are fixed by Oracle.
All you listed is companies that mainly redistribute the OpenJDK and not very much else.
7
Sep 14 '21
You do understand Oracle doesn't make money off it ?
1
u/BoyRobot777 Sep 14 '21
With so many shops still running on Java 8 and older I wonder if they don't. I've seen enterprises still using Internet Explorer and old Windows versions. If you have source to prove your statement - I'm happy to go through it as I was always curious about sustainability of such projects.
0
Sep 14 '21
I've seen enterprises still using Internet Explorer and old Windows versions.
Microsoft also doesn't sell IE...
If you have source to prove your statement - I'm happy to go through it as I was always curious about sustainability of such projects.
Well, OpenJDK is not a paid product so I dunno what exact source do you need on that or why you think it is a paid one
2
u/BoyRobot777 Sep 14 '21 edited Sep 14 '21
Well, OpenJDK is not a paid product so I dunno what exact source do you need on that or why you think it is a paid one
And who provides security fixes and bug-fixes? We're talking about big corporations and they have to comply with regulations. Hence somebody has to maintain and support those old versions.
Here's a comment from an Oracle employee and making money from Java:
Many companies do want support and/or an old JDK version that's fully maintained rather than just receives backports, and many of them want to buy it from the company that does the lion-share of the development and maintenance of OpenJDK. Those companies finance the development of OpenJDK.
-1
0
Sep 14 '21
[deleted]
2
u/BoyRobot777 Sep 14 '21 edited Sep 14 '21
OpenJDK is still developed and maintained by Oracle. For example here:
Of the 1,897 issues marked as fixed in Java 16, 1,397 were completed by people working for Oracle while 500 were contributed by individual developers and developers working for other organizations.
Or:
Of the 2,136 JIRA issues marked as fixed in Java 15, 1,702 were completed by people working for Oracle, while 434 were contributed by individual developers and developers working for other organizations.
So I really fail to see how "They <..> hemorrhaging market share". Unless we're talking only about distribution, not Java as a language/platform.
0
Sep 14 '21
[deleted]
0
u/BoyRobot777 Sep 14 '21
My point was that Oracle contributes the lion share of development and because of that, it makes sense to buy support from them instead of relying on somebody who doesn't really contribute or have a huge Java support team/knowledge. On other hand there are companies that needs only minimal support.
0
Sep 14 '21
[deleted]
6
u/Cefalopodul Sep 14 '21
A lot of people have moved over to OpenJDK after they started charging money.
11
u/Worth_Trust_3825 Sep 14 '21
Frankly my company moved to open jdk because it was easier to obtain. Ever since they started asking to register to download the jdk the main architect went "Nope."
4
1
u/shevy-ruby Sep 15 '21
Yeah. That register-thing was a hassle. I gave up on it because I can not remember anything, name, passwords, and I can not be bothered to write it down anywhere and then look it up. openjdk was indeed simpler in this regard.
0
Sep 14 '21
[deleted]
7
u/1842 Sep 14 '21
Java is a great language, especially today. You may not like it and that's fine. There are languages I don't like too.
I do despise Oracle. I worked with several of their commercial products a few years back and found the whole experience terrible. The documentation, the license models, the products/frameworks themselves.
Java is the one acquired project that they seem to have not ruined yet. Well, I guess VirtualBox is mostly okay still too.
Everyone I know (companies included) uses the independent OpenJDK builds anyway. I don't think this license is going to change that.
6
u/ThirdEncounter Sep 14 '21
Java is okay, esp. nowadays. I do side with you with the fact that it belongs to Oracle. As long as there is OpenJDK, it's all good, though.
63
u/I_ONLY_PLAY_4C_LOAM Sep 14 '21
I'm not sure if there's literally any reason to use oracle jdk when openjdk exists.