
If you see an error like "java: invalid source release" when you run a Java class in IntelliJ IDE then follow the below steps to fix this issue.
- Right Click on your Project/Module folder.
- Now select "Open Module Settings..."
- Next click on Project under Project Settings.
- Make sure that Langauge Level is lower or equal to the SDK (Java JDK) version you have selected.
- Click OK.
- Run your Java program again and it should work without any issues.

This is not an AI-generated article but is demonstrated by a human with IDEA IntelliJ 2023.02 version on a M1 Mac running macOS Sonoma 14.0.
Please support independent contributors like Code2care by donating a coffee.
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!