So, the JDK, the Java Development Kit
comes in many different versions.
Now, usually, if you're actually installing software,
the general rule is just to grab the very latest version
and use that and if an update comes through,
just update to that version.
But things aren't that simple with the Java Development Kit.
Now, the reason is, firstly we've got versions of the JDK
that get released every six months
and after the six months they expire.
Then we've also got this other concept of an LTS version,
which is a long-term support version of a JDK
so which version do you use?
Confused yet?
Well, let's go through which version you should be using
in this video but firstly though,
speaking of long-term support,
let's talk about a Java course with long-term support,
my very own Java Master class
with 77 hours of video training,
320,000 students and tens of thousands of glowing reviews,
this truly is the best way to learn Java.
Grab a massive discount and instant access
by visiting lpa.dev/YoutubeJava
or by clicking on the link in the description of this video.
(upbeat music)
All right, so welcome back, so let's talk about
what version of the JDK we should be using.
You'll note that there's lots of different vendors
who each produce a version
of their own Java Development Kit.
We're not gonna talk about that in today's video.
Now, we've got vendors like Oracle, Amazon, IBM,
Red Hat, just to name a few,
so they each produce their own version
of the Java Development Kit
but using the same version numbers
so I need to create a separate video outlying
which version or which vendor you should choose.
In this video, we'll stick to purely the version number
you should be using so check outside that video,
you'll see that on this channel when I release it
which will be the next video after this one.
All right, for now though, let's talk again,
which I mentioned at which version
of the JDK you should be using.
So, a new version of the JDK gets released,
as I mentioned earlier, every six months.
Now, when that new version is released,
at the expiry of the six months,
that expires, so in other words, it's no longer supported
and another version is basically released
which takes its place.
And the thing to remember is with the older version,
it no longer gets updated
so you need to be careful, obviously,
in terms of which version you're choosing for that reason.
Now, to give you a bit of a history,
JDK version nine, well that came out in September, 2017,
the JDK 10 got released in March, 2018,
so at the same time, JDK nine expired
and is no longer supported.
JDK 11, well that got released in September, 2018,
but I'll come back to that shortly.
The JDK 12 got released in March, 2019,
and JDK 13 is going to be released in September, 2019,
and JDK 14 will be released in March, 2020.
So, going back to JDK version 11,
I mentioned it was released in September, 2018,
but it's designated as the LTS,
or long-term support version of Java
and consequently is gonna be supported with updates
and commercial support if you want it, until at least 2026.
Now, the reason that I'm bringing all this up
is that large companies, software development firms
but also large companies with an investment in Java,
will generally use this version,
the long-term support version because of that support
but also to ensure that they don't have to chop
and change their code base dramatically every six months.
Now, supporting each release of a JDK might be minor
for a relatively small code base,
if you haven't got a lot of source code,
but if the existing code base is large
and obviously with a large company, they probably made
significant investment in Java over the years,
it might be a significant effort just maintaining
compatibility with new releases of the Java Development Kit
so basically these larger companies have to balance that
against adding new features of the software
and that's obviously what their clients want.
They're not particularly interested in, usually,
in which version of the JDK the software happens
to be support or run under,
they just want the new features that are being added.
So, for this reason, large companies
will stick to JDK 11 as a rule
and that's because it's supported until at least 2026
but also there's no new features
of the language introduced there
so they don't, in other words, they don't have
to risk breaking compatibility with that source code.
So, in general, having said all that,
my advice is for you to be using JDK version 11.
Now the expiring versions, the new versions
that are coming out, like, for example, JDK 12,
they introduce minor features of the language
and obviously, if you're sticking to JDK 11,
then you won't be able to use those new features
that are coming out in JDK 12 and 13.
But, the core Java language won't change that much
in between the long-term support versions
and the minor versions so keep that in mind
and it's for that reason again
that larger companies and your future employers
will most likely be sticking to JDK 11.
So think of JDK 11 for large companies
as sort of a line in the sand, in that they can focus,
again, as I mentioned, focus on their product
and new features they're adding to the code
and not having to sort of deal with maintaining
or having compatibility with the newer version of the JDK
and, of course, they've also got commercial support
guaranteed to at least 2026.
Now, speaking of the long-term support versions,
now I mentioned that JDK 11
is the latest long-term support version,
supported to at least 2026,
well the current model is to release an LTS support,
a LTS version of JDK, every three years
so consequently, the next LTS version,
and that's your JDK 17, is due September, 2021,
so in other words, in terms of supporting
that long-term support, that would be the next base
I suspect that most large companies will be focusing on.
They'll be targeting the September, 2021,
release JDK 17 as the next time to update.
So, in other words, they'll move their code base
from JDK 11 to JDK 17 at that point in time
so that they've got a fixed agenda
that they can actually focus on
and they may even be on the site in between
actually producing their software for their clients.
They may even have some staff who are dedicated
to just making sure that things
are gonna be ready for JDK 17
so that may well be what they'll be doing
but in any event, the thing is,
my recommendation is to stick to JDK 11 right now.
Now, I do realise that this isn't a perfect system
because, obviously, if you wanna take advantage
of some of the new features that have introduced,
for example, JDK 12 has got a new switch expression feature
which is pretty neat.
We obviously can't use that sticking to JDK 11
but, you know, it's a bit of give or take there.
You gotta take the good with the bad
so I think there's more reasons
for you to to stick to JDK 11
because that's more than likely what your employer,
future employer is gonna be using
when you switch across to them anyway
so I think JDK 11, in general,
is a good choice for most developers
and, again, it's because most companies that you work for,
or go to work for, will be using that.
All right, so that's what version
of the JDK that I recommend
and I actually said earlier in the video
that I'm gonna create another video
and it will be coming up after this one in a few days time.
I'm gonna go through the vendors,
the major companies or vendors that produce JDKs.
I'm gonna help you to decide which one you should go for
and I mentioned a couple of companies,
Oracle, we've got Amazon, we've got Azul,
Open JDK, IBM and so on,
so it can get a bit confusing as to what version,
which vendor you should be choosing
but I'll go through the pros and cons and lead you,
hopefully, to a decision on which way you can go
but keep in mind then again, with all these vendors,
they still use the same release number
so, in other words, they all have a JDK version 11
to stick to and it's just their particular,
you know, what they've actually added to it.
They basically can change a few things up
within each version of the JDK.
For example, there might be a different runtime
that you can select that's got better
performance from a particular vendor
but I'll go through all that in a future video.
The bottom line is that now you know
which version JDK 11 to stick to
so I'll see you in the next video.
Amazing, you made it to the end of the video.
If you're interested in more programming tutorials,
click on the top rectangle over here
but if you're interested in programming tutorials,
click on the bottom rectangle down there
and if you're interested in subscribing to this channel,
and why wouldn't you be,
click on the subscribe button up here.
I look forward to catching you in another video.