Why do I get an unmappable character for encoding UTF-8 when I changed maven java compiler plugin from 1.5 to 1.6?

前端 未结 1 857
生来不讨喜
生来不讨喜 2021-01-18 03:53

I have a Java project and I\'m using Apache Maven. All this time I was using Maven Java compiler plugin with parameters source=1.5 and target=1.5 defined i

1条回答
  •  说谎
    说谎 (楼主)
    2021-01-18 04:10

    My question is: why is this an error with source=1.6 and target=1.6 and it's a warning with source=1.5 and target=1.5?

    Short anwser, because they said so:

    -source 1.6 This is the default value. No language changes were introduced in Java SE 6. However, encoding errors in source files are now reported as errors, instead of warnings, as previously.

    @DaveG concerns are valid, and you should try to:

    • Change the file encoding of your source files
    • find/replace those chars with your IDE

    0 讨论(0)
提交回复
热议问题