I have a project with many modules, all of which need to be compiled using Java 7. I have made sure every setting that I know of to point to that version of Java, yet somehow, every time I rebuild the project I get:
Information:javac 11.0.3 was used to compile java sources
followed by a list of errors:
Warning:(86, 25) java: as of release 9, '_' is a keyword, and may not be used as an identifier
Error:(86, 25) java: cannot find symbol
symbol: class _
location: class com.(...)`
Following other questions like:
Can't resolve -source errors on IntelliJ with regards to Project Language Level
IntelliJ IDEA tells me "Error:java: Compilation failed: internal java compiler error idea"
I have tried these settings:
- Under Project Structure -> Project -> Project SDK: 1.7
- Project Structure -> Project language level -> 7 - Diamonds, ARM, multi-catch etc.
- Under Project Structure -> Modules checked every module, and that was not fun, because there are about 50. Sources tab -> Language level: Project detaulf (7 - Diamonds, ARM, multi-catch etc.)
- Project Structure -> Modules, each Dependencies tab -> Module SDK: Project SDK (1.7)
- Project Structure -> SDKs: it listed IDEA's built in Java 11, so I removed it, leaving only: 1.7
- Settings -> Java Compiler -> Use compiler: Javac
- Settings -> Java Compiler -> Use compiler from module target JDK when possible: unticked
- Settings -> Java Compiler -> Per-module bytecode version: all modules set to 1.7
I am running the latest version of IntelliJ IDEA:
IntelliJ IDEA 2019.2 (Ultimate Edition) Build #IU-192.5728.98, built on July 23, 2019
Is this a bug with IDEA?