WEBVTT

00:00.040 --> 00:00.520
Hi everyone.

00:00.520 --> 00:01.120
Welcome back.

00:01.120 --> 00:05.920
In this lecture I would like to take a step back and then look at where we are at this point of the

00:05.920 --> 00:06.400
course.

00:06.400 --> 00:10.000
So far we have covered all the Java eight features.

00:10.000 --> 00:15.120
We have looked at lambdas, streams, optionals and new date time APIs.

00:15.120 --> 00:18.480
So basically, the first part of the course that I promised came to an end.

00:18.520 --> 00:23.240
Now it's time to look at all the features from Java nine and beyond.

00:23.240 --> 00:29.000
So we are going to be exploring all these features that are listed in the Java nine and beyond section

00:29.000 --> 00:29.480
here.

00:29.480 --> 00:34.000
So for this purpose, we are going to be working on a different project starting from this particular

00:34.000 --> 00:34.520
lecture.

00:34.520 --> 00:40.200
So in this lecture we are going to be setting up the base project for exploring all the Java nine features

00:40.200 --> 00:40.840
and beyond.

00:40.880 --> 00:42.640
Let's go back to the GitHub repo.

00:42.640 --> 00:47.760
And then I would like to download the base project from GitHub repo and then set it up in our IntelliJ.

00:47.800 --> 00:48.160
Okay.

00:48.200 --> 00:50.680
So I'm going to be going back to the GitHub repo.

00:50.720 --> 00:51.200
There you go.

00:51.240 --> 00:52.440
The modern Java v2.

00:52.480 --> 00:53.240
That's a repo.

00:53.280 --> 00:55.120
What I'm going to do I'm going to click on this one.

00:55.120 --> 00:57.640
And then I'm going to be downloading the zip file.

00:57.640 --> 00:58.240
There you go.

00:58.280 --> 00:59.600
The zip file got downloaded.

00:59.600 --> 01:00.640
So this is where it is.

01:00.680 --> 01:03.480
And then I'm going to be going inside this project.

01:03.480 --> 01:06.560
And in the project you will have something called modern Java.

01:06.600 --> 01:08.440
Okay I'm going to copy this one.

01:08.440 --> 01:11.520
And then I'm going to go to my modern Java v2 folder here.

01:11.520 --> 01:13.880
And then I'm going to place it over here.

01:13.880 --> 01:18.560
And you need to ensure that you are on the main branch, because this is a branch which has the starter

01:18.560 --> 01:20.840
code for the modern Java project.

01:20.840 --> 01:23.920
So now what we are going to do I'm going to go back to the IntelliJ.

01:23.960 --> 01:27.280
So in IntelliJ I'm going to click on the file and then click on the new.

01:27.280 --> 01:30.680
And then I'm going to select project from existing sources.

01:30.680 --> 01:31.560
Click on this one.

01:31.560 --> 01:35.640
And then we are going to go to the folder where I have copied and pasted that.

01:35.640 --> 01:36.880
So it's inside this one.

01:36.880 --> 01:38.760
Select this project and then click open.

01:38.760 --> 01:41.360
So this will open the project in a new window.

01:41.360 --> 01:44.240
And this project is going to be a Gradle based project.

01:44.280 --> 01:46.840
We will not be making any changes to the Gradle project.

01:46.840 --> 01:48.920
It's just that you need to select this build tool.

01:48.960 --> 01:53.480
Even if you have not worked on Gradle, you don't have to worry about it because we will not be making

01:53.480 --> 01:56.360
any changes to this particular bill file at all.

01:56.360 --> 01:58.480
So click Gradle here and then click create.

01:58.480 --> 02:02.440
So this is going to be importing the project in a new IntelliJ window.

02:02.480 --> 02:03.000
There you go.

02:03.040 --> 02:05.480
Or it might be opening in a tab in your case.

02:05.480 --> 02:09.040
And you can see that in the bottom it is importing the Gradle project.

02:09.040 --> 02:09.440
There you go.

02:09.480 --> 02:10.800
The project got imported.

02:10.800 --> 02:15.640
And then the one thing that I want to show you is that if you open the Build.gradle file, which is

02:15.640 --> 02:21.280
at the base path, the version of Java is being configured in this particular file.

02:21.280 --> 02:24.960
So if you take a look at it we have this sub project section.

02:24.960 --> 02:30.320
And this sub project section actually has a configuration where we define the source compatibility as

02:30.360 --> 02:31.440
version 25.

02:31.680 --> 02:37.320
This means we are using the latest and greatest version of Java at the time of recording this lecture.

02:37.320 --> 02:42.440
And this is the latest LTS version which is the long term stable version.

02:42.760 --> 02:43.280
Okay.

02:43.320 --> 02:45.280
So now we have this over here.

02:45.280 --> 02:51.880
And the next thing is that if we go to the settings, you need to ensure that we are using the Gradle

02:51.880 --> 02:53.880
JVM also as Java 25.

02:53.880 --> 02:57.440
So if you open the settings you'll go to the build execution in development.

02:57.440 --> 03:00.360
And then we will have the Build Tool section over here.

03:00.400 --> 03:04.720
Click on the Gradle and then you select the Gradle JVM as Java 25.

03:04.720 --> 03:07.400
So you will have all these different versions available.

03:07.640 --> 03:10.440
These are the different versions of Java I have in this machine.

03:10.440 --> 03:13.240
So Java 21, Java 17, Java 11.

03:13.240 --> 03:17.440
But the one that I'm going to be choosing is that eclipse 25.

03:17.480 --> 03:20.640
This is the one that we installed in our previous lecture.

03:20.640 --> 03:22.600
So click apply and then click okay okay.

03:22.640 --> 03:24.600
So you can see that it's being refreshing.

03:24.600 --> 03:25.680
Something over here.

03:25.720 --> 03:32.200
This is a signal that we are actually configuring this workspace for Java 25 okay.

03:32.240 --> 03:35.190
So other option is basically opening this window.

03:35.190 --> 03:40.510
So in this window you still need to choose the SDK as Java 25.

03:40.910 --> 03:42.430
Let's see how to go to this window.

03:42.430 --> 03:45.750
Right click on this project open module settings.

03:45.750 --> 03:49.350
If you open that, this is the one which gives you this project structure.

03:49.510 --> 03:51.230
And then click on the project over here.

03:51.230 --> 03:55.750
So you need to have the SDK as Java 25 and the language level.

03:55.750 --> 03:59.390
I'm going to set it up as 25 over here apply.

04:00.230 --> 04:08.070
And then okay so when you have these setup completed this means your workspace is set up for Java 25.

04:08.270 --> 04:14.910
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.

04:15.150 --> 04:18.590
And then we are going to be selecting the war over here.

04:18.590 --> 04:21.070
So I'm going to be running this particular example.

04:21.070 --> 04:24.070
So this example should execute as expected.

04:24.110 --> 04:24.670
There you go.

04:24.990 --> 04:31.790
As long as you see this result this means our project is configured successfully for Java 25.

04:31.950 --> 04:34.030
And the code is working as expected.

04:34.230 --> 04:39.710
Starting from next lecture, we will explore all the features from Java nine until the latest stable

04:39.710 --> 04:42.070
version at the time of recording this lecture.

04:42.110 --> 04:43.670
This marks the end of this lecture.

04:43.670 --> 04:44.750
Thank you for watching.
