Hi everyone.
Welcome back.
In this lecture I would like to take a step back and then look at where we are at this point of the
course.
So far we have covered all the Java eight features.
We have looked at lambdas, streams, optionals and new date time APIs.
So basically, the first part of the course that I promised came to an end.
Now it's time to look at all the features from Java nine and beyond.
So we are going to be exploring all these features that are listed in the Java nine and beyond section
here.
So for this purpose, we are going to be working on a different project starting from this particular
lecture.
So in this lecture we are going to be setting up the base project for exploring all the Java nine features
and beyond.
Let's go back to the GitHub repo.
And then I would like to download the base project from GitHub repo and then set it up in our IntelliJ.
Okay.
So I'm going to be going back to the GitHub repo.
There you go.
The modern Java v2.
That's a repo.
What I'm going to do I'm going to click on this one.
And then I'm going to be downloading the zip file.
There you go.
The zip file got downloaded.
So this is where it is.
And then I'm going to be going inside this project.
And in the project you will have something called modern Java.
Okay I'm going to copy this one.
And then I'm going to go to my modern Java v2 folder here.
And then I'm going to place it over here.
And you need to ensure that you are on the main branch, because this is a branch which has the starter
code for the modern Java project.
So now what we are going to do I'm going to go back to the IntelliJ.
So in IntelliJ I'm going to click on the file and then click on the new.
And then I'm going to select project from existing sources.
Click on this one.
And then we are going to go to the folder where I have copied and pasted that.
So it's inside this one.
Select this project and then click open.
So this will open the project in a new window.
And this project is going to be a Gradle based project.
We will not be making any changes to the Gradle project.
It's just that you need to select this build tool.
Even if you have not worked on Gradle, you don't have to worry about it because we will not be making
any changes to this particular bill file at all.
So click Gradle here and then click create.
So this is going to be importing the project in a new IntelliJ window.
There you go.
Or it might be opening in a tab in your case.
And you can see that in the bottom it is importing the Gradle project.
There you go.
The project got imported.
And then the one thing that I want to show you is that if you open the Build.gradle file, which is
at the base path, the version of Java is being configured in this particular file.
So if you take a look at it we have this sub project section.
And this sub project section actually has a configuration where we define the source compatibility as
version 25.
This means we are using the latest and greatest version of Java at the time of recording this lecture.
And this is the latest LTS version which is the long term stable version.
Okay.
So now we have this over here.
And the next thing is that if we go to the settings, you need to ensure that we are using the Gradle
JVM also as Java 25.
So if you open the settings you'll go to the build execution in development.
And then we will have the Build Tool section over here.
Click on the Gradle and then you select the Gradle JVM as Java 25.
So you will have all these different versions available.
These are the different versions of Java I have in this machine.
So Java 21, Java 17, Java 11.
But the one that I'm going to be choosing is that eclipse 25.
This is the one that we installed in our previous lecture.
So click apply and then click okay okay.
So you can see that it's being refreshing.
Something over here.
This is a signal that we are actually configuring this workspace for Java 25 okay.
So other option is basically opening this window.
So in this window you still need to choose the SDK as Java 25.
Let's see how to go to this window.
Right click on this project open module settings.
If you open that, this is the one which gives you this project structure.
And then click on the project over here.
So you need to have the SDK as Java 25 and the language level.
I'm going to set it up as 25 over here apply.
And then okay so when you have these setup completed this means your workspace is set up for Java 25.
Now what I'm going to do is I'm going to open one of the actual project module and then go to the main.
And then we are going to be selecting the war over here.
So I'm going to be running this particular example.
So this example should execute as expected.
There you go.
As long as you see this result this means our project is configured successfully for Java 25.
And the code is working as expected.
Starting from next lecture, we will explore all the features from Java nine until the latest stable
version at the time of recording this lecture.
This marks the end of this lecture.
Thank you for watching.