Idea prompts Information: javac 1.8.0_251 was used to compile java sources error
This problem occurred after re-building a maven project. When writing a maven project before, I used the Lambda syntax after jdk8 and there was no error, but don’t panic.
Solution:
The focus is:
File -> Project Structure -> Project Settings
File -> Project Structure -> Module Settings -> Tab: Sources: Language Level
File -> Project Structure -> Module Settings -> Tab: Dependencies: Module SDK
File -> Settings -> Compiler -> Java Compiler -> Target bytecode version
The four versions must be the same
Similar Posts:
- [IDEA] Maven Run Project Error: Diamond operator is not supported in – source 1.5″
- Automatic version change of IntelliJ idea language level and Java compiler
- [idea]Error:java: invalid source release: 1.8
- [Solved] IDEA Compile Error: java: Compilation failed: internal java compiler error
- Error:java: javacTask: source release 8 requires target release 1.8
- Usage of API documented as @since 1.8+
- Error:java: Compilation failed: internal java compiler error
- [Solved] Error:java: Compilation failed: internal java compiler error
- [Solved] maven 3.5.0 combined with eclipse suggests solutions to lambda expressions are allowed only at source level 1.8 or above errors
- [Solved] Error:java: error: release version 5 not supported & Switch Unrecognized String