Unable to compile simple Java 10 / Java 11 project with Maven

前端 未结 7 918
没有蜡笔的小新
没有蜡笔的小新 2020-11-22 14:31

I have a trivial Maven project:

src
└── main
    └── java
        └── module-info.java
pom.xml

pom.xml:

org.         


        
7条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-22 14:36

    If you are using spring boot then add these tags in pom.xml.

    
        org.springframework.boot
        spring-boot-maven-plugin
    
    

    and

    
        UTF-8
        UTF-8
        ``10
    
    

    You can change java version to 11 or 13 as well in tag.

    Just add below tags in pom.xml

    
        UTF-8
        UTF-8
        11
    
    

    You can change the 11 to 10, 13 as well to change java version. I am using java 13 which is latest. It works for me.

提交回复
热议问题