top of page
  • Writer's pictureTim Buchalka

Choosing The Right JDK Vendor and JVM

Previously, I talked about the JDK version or the Java version that you should be using and that I recommend you use as a developer or a student. Check out the blog post here. The short answer is that I recommended using JDK 11 but check out that blog post for the reasons why. But in this blog post, I wanna talk about the various offerings made by different JDK vendors.


JDK vendors are companies who produce a version of the Java Development Kit. Gone are the days where we used to have just a single version by Oracle, we've now got multiple versions. So I wanna go through and talk about the various versions that are available to you and the options that you have as a developer or student these days.


We're talking about which JDK vendor you should choose, which product ultimately you should be using as a developer or a student, but also which JVM (Java Virtual Machine), which is basically the software that executes your Java code, which one you should be using as well.


Let's start off with Oracle because of course they're the current owners of the Java language. Now, Oracle produce two versions of JDK. They've got a commercial version as well as an open source version. The commercial version is released under the Oracle Technology Network Licence or OTN licence for short. Now that's free for personal use, for developing, testing or demonstrating Java software. So if you're a developer or a student you won't need to pay anything, you can use that version. But if you're a company, and you're actually executing programs using the Java Virtual Machine that's included in that Java Virtual Development Kit, then you do need to pay.


Oracle have got various licencing options for you, in that scenario, and just see the link in the reference links at the end of this post. You can go and check out their page and depending on the model, there's a subscription, like there's a per monthly cost or there's also various membership options, and that you can pay a fee and you get access to and be able to use that in a commercial environment as well. But if you're just a developer or student you can use that pretty well unrestricted for testing or writing, and also demonstrating any Java programs you create.


So that's the first version. Oracle also released an OpenJDK version. OpenJDK is a version that is an open source version of the Java programming language and the Java Development Kit. Now that's released under the GNU Classpath Exception Licence. Now if you know anything about open source, you will know that the GNU licence typically requires you to release the source code of any programs that you actually write along with any components that you used that's basically licenced by the GNU or within the GNU licence. So, if you had some software that was released under that model, technically you have to either provide the source code bundled in a package or provide a mechanism for anyone to get that if they ask for it.


But this is a revived version of that licence, this is the GNU plus Classpath Exception licence, and that means that you don't need to provide the source code. You've got the option there for you to still take advantage of the open source Java Development Kit without you having to release your own public source code, and obviously that would be something you wouldn't wanna do normally as a developer if you're writing commercial software to release that. So for that reason, it's probably a really good thing for you to look at as a developer and even for commercial companies to look at because of course their source code doesn't need to be released.


In terms of the two versions, the commercial version and the open source version, they're both functionally identical. There's a few little changes in the two packages but from a functional point of view they're both identical.


The other advantage of looking at the paid version from Oracle is that there's paid commercial support available if you need that as a company so that's another big thing. Probably larger companies will take advantage of that, companies that will be able to get support if there's a need for it.


Now there's a lot of people who frown upon Oracle and say things along the lines of "Why should they charge for Java?" but look, the reality is, Oracle, like them or hate them, they are a commercial company and they're in this to make money as perhaps most companies are, so is that really a bad thing? They're actually saying that to use one of their versions, the commercial version, you need to pay for it, and I think that's particularly big deal, particularly because there's an open source version that they also distribute that is available to you. There are links in the resources list at the bottom of this post talking about both versions and giving you access to check those out. I think it's a good thing to have options there. You can take advantage of the commercial one if you want, but there's an open source option as well.


Speaking of the OpenJDK, there's lots of places to get a custom version of the OpenJDK. Now we'll start with one website, http://adoptopenjdk.net. They've actually got prebuilt JDK's with a choice of the Java Virtual Machine. They are actually releasing the OpenJDK which is pretty cool, and they've got you two options for the Java Virtual Machine: they've got the HotSpot JVM, as well as OpenJ9 that's pretty easy when you go to download it. You select your platform or it will auto find that for you, then you select the version of the JDK that you want and then you select whether you want the traditional HotSpot or the OpenJ9 versions of the JVM.


Now it doesn't really matter typically as a developer as to which one you use because both of them are , certainly run your code and I'll talk about some of the different reasons, pros and cons of JVMs later in this post. But HotSpot JVM is the most widely deployed version of the Java Virtual Machine and the OpenJ9 is a JVM alternative version and it's got some pros and cons. Typically, one of the biggest pros is that it's an open source version of the Java Virtual Machine. It uses less memory, it's basically less memory hungry and it's also faster in many typical applications. You should really test the JVM and it's a simple thing to do now because you can download both, if you're choosing one for your particular app.


But as a developer or student, the point here, it doesn't really matter that much which version you actually choose and the reason for that is that your code's going to run just fine on both of them. It's more a performance reason or memory reasons which typically a large company would be needing to make a decision for their server infrastructure.


Now IDM talk about their JDK and the OpenJ9 in this blog post, and there's a link to that also in the resources list (lots of links in there today). Now IDM used the OpenJ9 product on their servers, and they do use that still to this day. They actually created the J9 version of the Java Virtual Machine but then they released it as an open source product and it's now called OpenJ9 and that's now maintained by the Eclipse Foundation as well. You can basically attribute to that, access that, and use it free which is pretty cool. All right, so those are the two versions effectively you can get with different JVMs for the OpenJDK.


Another one that I think is pretty cool, is Amazon Corretto. Now that's another JDK which has now got free support which is pretty cool, and it's now used on pretty well all Amazon servers. They've really gone to town on that and they're using it on all their production servers. O(ne great thing and one great reason to consider using Amazon's Corretto is that James Gosling, the father of Java actually works at Amazon. I know he tweeted a post saying he was pretty happy that Amazon have actually released their own version of the JDK and the JVM.


The other typical things that Amazon Corretto are focusing on, (as of the time of posting this blog) there are only two versions available: the version 8 of Java version and then the version 11 and long term support. So basically, Amazon is focusing more on a long term support of the OpenJDK implementation, their own custom version, and they're making changes. The good thing about it is with the changes they're making, they're contributing their changes back to the OpenJDK project. This is a good thing because let's face it, Amazon is a big company. They've got lots of resources which means that ultimately any changes they make will be reflected back in other OpenJDK implementations over time.


So I think Amazon Corretto, for those reasons, the fact that they are focusing on long term support (free support included), it's already been widely tested on Amazon's production servers. I mean let's face it, they wouldn't be putting something in place that wouldn't give the best performance possible because they've already been pushing that and have been for some years now, with their server offerings. So I think that's certainly a good alternative solution to the other options I've shown or talked about in this post.


A couple of other options to talk about include Red Hat and Azul. Now both of these companies have got paid support available and their own custom version of an OpenJDK. Now Azul has got a non-free but very powerful JVM called Zing. I like the clustering capabilities of that and they're seeking more of the performance. They're really trying to raise the performance of Java applications with their JVM's so that's certainly something to consider but probably not for you as a developer or student because it's more an enterprise company looking to deploy Java on the Java Runtime, the Java Virtual Machine on their servers. They'll start assessing the performance reasons. The point here with these two vendors, Red Hat and Azul, is both of these are based on the OpenJDK as I mentioned, and for that reason, it's just another good alternative.


There are certainly lots of other versions of OpenJDK from different vendors, but they are the main ones as of this point in time and of course new ones for us have come on a regular basis. But I think it's important to try and stick to one that you're getting some form of support for, or at least it's getting updates on a regular basis.


So leading into that now is which version should you use as a student? Well I think there's two good options here: the AdoptOpenJDK version's pretty cool and it's really easy to install, and Amazon Corretto is another good option. Either of those two options would probably be the ones that I would suggest looking at first. The fact that Amazon's providing the long term support version and free support, I think that's a big plus because you're gonna get that support for a long time to come.


In general having said that, any OpenJDK implementation is probably worthwhile using, but again keep in mind that the Oracle OTN version is still basically free as a developer or a student for personal use. So if you're just using that to create software to test it or to demonstrate it, it's actually free so that's a good thing. What I'm going to be doing is uploading installation videos in my YouTube channel for Amazon Corretto and also for the AdoptOpenJDK in the future because I think they're the two good choices.


Now I don't think there's any real reason these days to go to the Oracle paid version unless you've got a commercial product and you think you're going to be using that on your servers or you're working for an employer who's using that paid version. But even with that said, with the choices of JVM these days, your code's going to run on any JVM anyway because usually these JVMs are fully tested to make sure that they meet the specifications and thus, can run any Java code.


In general, you shouldn't have any issues irrespective of which choice you choose you're going to get one that actually works for your program. It's just really down the track when you're looking to getting into deploying applications that you have to consider it. So my choice is AdoptOpenJDK or Amazon Corretto.


All right, thanks for reading and I hope you got a lot out of this blog post. You've made it to the end! If you've got any questions, feel free to leave a comment and I'll get back to you.


 
2,545 views0 comments
bottom of page