eclipse magic: … Syntax error, varargs are only available if source level is 1.5 or greater

前端 未结 11 1484
醉话见心
醉话见心 2020-12-09 15:06

Yesterday I made a project in eclipse, and it was working, compiling. I used Eclipse Galileo for Java EE. Today I open eclipse and see lots of errors saying that stuff is no

11条回答
  •  我在风中等你
    2020-12-09 15:33

    I had the same issue after I installed Eclipse on Centos 7.

    However in my case changing the Compiler compliance level did not fix the problem.

    To fix the problem I changed the Eclipse Installed JREs Window->Preferences->Java->Installed JREs path, which was /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b08-0.el7_7.x86_64 to an Oracle JDK at /usr/lib/jdk1.8.0_121-linux-x64

    After this change the problem went away.

提交回复
热议问题