In the eclipse IDE 2021-12. At the time to run the Dynamic web project, we have to face an issue that the output cannot display accurately or show some error. So the solution to the problem is to install and modified the current JDK versions on the eclipse.

First, we have to open eclipse IDE.

Click on the window and then go to the preferences.

In this window, we have to select java and then click on the installed JREs.

Here you will have the list of available JREs and here you will see the default one

If you want to add a new one then click on the add button.

Once you have to click on add and then we have to select standard VM and then click on the next button.

Then click on the directory button

Then select the path of the JDK version which is available on the C drive that you were already installed. I have installed JDK 1.8.0_202 and JDK 11.0.13 so I can select both one by one. Now click on the select folder.

Let’s click on finish.

Now you see this JDK has been added then select the JDK version and click on Apply and Close button.

 I can do the same thing again to add JDK 11.0.13.

Now you can see your project run on the default JRE. To change the JDK version click on the project select the build path and then configure the build path.

Now you can see your project run on the default JRE. To change the JDK version click on the project select the build path and then configure the build path.

Now you see the window click on the java path then click on Libraries then select the JRE system library.

In this window, you just have to select JDK that you want to use for your project. Click on the list and select the JDK and then click on the finish button.

Let’s click on apply and close

After that, if the compiler does not work correctly then you have to increase the compiler compliance level. The level of compiler compliance is more than the version number of JDK. You can change the level to click on window> then go to preferences> and click on java> and then click on the compiler.

For example, I am using JDK 11 so the compiler compliance level is more than 11.
 
And now your project can run successfully.

Leave a Reply

Your email address will not be published.