JDK-8314673 : Release Note: Generate "output file clash" Warning when an Output File is Overwritten During Compilation
  • Type: Sub-task
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 21
  • Priority: P4
  • Status: Resolved
  • Resolution: Delivered
  • Submitted: 2023-08-21
  • Updated: 2023-09-05
  • Resolved: 2023-08-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 21
21Resolved
Description
Prior to JDK 21, the `javac` compiler was overwriting some output files during compilation. This can occur, for example, on case-insensitive filesystems.

Starting from JDK 21 a new compiler option: `-Xlint:output-file-clash` has been added to the `javac` compiler. This new option should provide a way for users experiencing this problem to convert what is currently a runtime error into a compile-time warning (or error with `-Werror`). This new compiler option enables output file clash detection. The term "output file" covers class files, source files, and native header files.