Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Continuously getting the java: invalid source release: 1.9 error when compiling

I have attempted to fix this problem using the various forums on this site, but nothing has helped. I tried similar techniques as used to fix other people's 1.8 errors, but nothing has worked. I have my java class file under my source folder and no imports, I just simply want a basic output message to make sure intelliJ is working as it should. Can anyone offer any advice?

like image 311
Nick Mucci Avatar asked Mar 07 '17 14:03

Nick Mucci


1 Answers

Here change the language level to 1.8 or lesser. This changes the target release version.

Go to file -> settings -> Build Execution and Deployment -> Java -> Compiler

Here change the language level to 1.8 or lesser. This changes the source release version.

File -> Project Structure -> Module Settings -> Tab: Source: Language Level

and also here,

File -> Project Structure -> Project(In left pane) -> Project language level

like image 50
Srikanth A Avatar answered Oct 21 '22 08:10

Srikanth A