Yes, the warning for projects with no explicit default encoding is a new thing in Eclipse 2022-06 (4.24).
To set an explicit default encoding do one of the following:
- In the Problems view, select the warning, hit Ctrl+1 and apply the provided Quick Fix (sets the project encoding explicitly to the workspace encoding)
- Change the project manually in Project > Properties: Resource
See also my video showing and explaining this.
When using a build system like Maven or Gradle, set the encoding as follows instead:
Maven
- In
pom.xmlset the propertyproject.build.sourceEncodingtoUTF-8:<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties> - Right-click the project folder and choose Maven > Update Project…
Gradle
- In
build.gradlesetcompileJava.options.encodingtoUTF-8:compileJava.options.encoding = 'UTF-8'
- Right-click the project folder and choose Gradle > Refresh Gradel Project
- As long as Eclipse Buildship issue #344 is not fixed, change the encoding manually as described above