IntelliJ IDEA tells me “Error:java: Compilation failed: internal java compiler error idea”

前端 未结 12 948
梦谈多话
梦谈多话 2020-12-13 08:17

When I compile a Java project using IntelliJ IDEA, it gives me the following output (and error):

Information:Eclipse compiler 4.6.2 was used to compile java          


        
12条回答
  •  感情败类
    2020-12-13 08:48

    In JIdea 2020.1.2 and above,

    This is may be the language-level set in Project Structure is not compatible with the target byte-code version.

    You have to change the target bytecode version .

    1. Go to Settings [ Ctrl+Alt+S ]
    2. Select Java Compiler
    3. Select module in the table
    4. Change the byte-code version to map what you selected in the previous step for language-level

    NOTE : How to check the language-level

    1. Go to Project Structure [ Ctrl+Alt+Shift+S ]
    2. Select Modules sub section
    3. Select each module
    4. Under sources-section, check Language Level

提交回复
热议问题