intellij idea – Error: java: invalid source release 1.9

We Are Going To Discuss About intellij idea – Error: java: invalid source release 1.9. So lets Start this Java Article.

intellij idea – Error: java: invalid source release 1.9

Advertisements
  1. intellij idea – Error: java: invalid source release 1.9

    Sometimes the problem occurs because of the incorrect version of the project bytecode.
    So verify it : File -> Settings -> Build, Execution, Deployment -> Compiler -> Java Compiler -> Project bytecode version and set its value to 8

  2. intellij idea – Error: java: invalid source release 1.9

    Sometimes the problem occurs because of the incorrect version of the project bytecode.
    So verify it : File -> Settings -> Build, Execution, Deployment -> Compiler -> Java Compiler -> Project bytecode version and set its value to 8

Solution 1

Advertisements

Select the project, then File > ProjectStructure > ProjectSettings > Modules -> sources
You probably have the Language Level set at 9:

screenshot

Just change it to 8 (or whatever you need) and you’re set to go.

Also, check the same Language Level settings mentioned above, under Project Settings > Project

enter image description here

Original Author DeanM Of This Content

Solution 2

Advertisements

Sometimes the problem occurs because of the incorrect version of the project bytecode.

So verify it : File -> Settings -> Build, Execution, Deployment -> Compiler -> Java Compiler -> Project bytecode version and set its value to 8

Example

Original Author Rogol Of This Content

Solution 3

Advertisements

I have had the same problem. There is an answer:

  • 1.CTRL + ALT + SHIFT + S;
    1. Then go to “Modules”;
    2. Dependencies;
    3. Change “Module SDK“.

Got it!
Now u have Java 9!

Original Author Dmitry Kaltovich Of This Content

Solution 4

Advertisements

intellij-invalid-source

You should to set the JAVA SDK and appropriate language level in the project settings. Click to enlarge.

Original Author Gayan Weerakutti Of This Content

Conclusion

So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.

Also Read,

Siddharth

I am an Information Technology Engineer. I have Completed my MCA And I have 4 Year Plus Experience, I am a web developer with knowledge of multiple back-end platforms Like PHP, Node.js, Python and frontend JavaScript frameworks Like Angular, React, and Vue.

Leave a Comment