Cause: invalid source release 17 error in Java and Spring boot SOLVED Intellij

Cause: invalid source release 17 error in Java and Spring boot SOLVED Intellij


Cause: invalid source release 17 error in Java and Spring boot SOLVED Intellij

How to solve the error Cause: invalid source release 17 in java and spring boot intellij is shown


Content

0.48 -> hi everyone in this video I will be showing  you how to solve the error cause invalid  
5.46 -> Source release 17 and this error can occur both  in Java as well as spring boot application it  
10.8 -> can be anything so let's get started so the first  thing what you have to do is you need to download  
15.48 -> the latest version of java so for doing that just  go to browser and type Java download and you'll  
21.78 -> be having the link over here as java downloads  oracle.com so just click that and in the website  
28.14 -> you will be having Java 19 and 17 which are the  latest versions so if you are using Windows you  
33.12 -> can select 19 or 17 based upon here and just click  on Windows or your desired OS and just click on  
38.52 -> the installer if you click this link and you will  install it it's a simple installation process so  
43.32 -> once you are done installing the latest version  of java you need to like add that particular path  
47.46 -> to the environment variable so by default the  location of installation is going to be this PC  
51.9 -> local disk C and you'll be having program files  and inside that you will be having Java so here  
59.58 -> you can see I have I'm having both the version 17  and 19 as well so for this demo purpose I will go  
64.68 -> with 17. so I'm going to go to the particular  jdk and you have to go to bin and just click  
71.16 -> here and copy this path and you need to have bin  as well and just go to search and type environment  
77.88 -> you'll be having the edit the system environment  variables just click on open and here you need to  
84.78 -> just click on environment variables and go to path  edit and you need to just paste your path at the  
92.1 -> top so I will just click on new paste the path so  already I'm having a path over here the exact same  
97.2 -> path so what you can do is like I will go to path  again path in system variables edit so let me just  
102.9 -> paste that particular path and you need to move  that path towards the top yeah have it at the top  
107.76 -> most yeah have that particular path that you have  pasted at the top so just click on OK here as well  
114.96 -> and okay here as well so after doing all these  things you need to just like restart your IntelliJ  
121.14 -> all right just restart your IntelliJ and after  that you need to go to file first thing you need  
127.14 -> to go to Project structure and you'll be having  this project over here okay all right so here  
134.76 -> you have to just change it to the latest version  so here you can see I'm having open jdk version  
139.56 -> as 1.8.0 I need to change it as 17.0.5 so I will  just click it yeah just change this version the  
148.56 -> latest version that you have installed latest  jdk version and click on apply and OK as well  
155.1 -> so it'll take some time to load and again go to  file and you need to go to settings this time  
162 -> and in the settings you will be having this build  execution deployment just expand it and you'll be  
168.3 -> having the build tools over here and click on  Gradle and here you can see here also you need  
172.56 -> to change the version we will be having 1.8.0 just  change it to the latest version that you have just  
177.3 -> installed and click on apply alright apply and  okay and I think these two are fine I guess one  
183.54 -> is Project structure another one is settings  if you want you can just have a check over the  
187.74 -> compiler as well I think yeah compiler is well  and good so two places one is Project structure  
192.84 -> another one is going to be settings so after doing  this let me just now restart my application now
205.8 -> so this time you can see my spring boot  application has started successfully and I  
210 -> am not getting any errors so this is the live  proof that this method is working and I hope  
215.46 -> you would have found this video useful I've also  done many other tutorials in Java C C++ node.js  
220.74 -> react.js mongodb so do check other videos of  my channel subscribe me thanks for watching

Source: https://www.youtube.com/watch?v=vKonnuyw5UQ