On Windows, jpackage changes icons, version, and other properties of .exe files (launchers and EXE installers).
This functionality is encapsulated in jdk.jpackage.internal.ExecutableRebrander class [1].
Before jpackage edits an .exe file, it prints to the console the following message:
```
Warning: Windows Defender may prevent jpackage from functioning. If there is an issue, it can be addressed by either disabling realtime monitoring, or adding an exclusion for the directory <TMPDIR>.
```
where <TMPDIR> is the directory where jpackage assembles the output package.
This warning is merely helpful when the user uses the "--temp" option and has control over the jpackage's work directory. This is an uncommon scenario. This warning makes little to no sense when jpackage creates a new, unique work directory.
Rework ExecutableRebrander class so that instead of printing the warning, it would perform its operation on .exe files with retries.
[1] https://github.com/openjdk/jdk/blob/e0b040a6c6713827033e9ba51c9ded920dd0203b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/ExecutableRebrander.java
This functionality is encapsulated in jdk.jpackage.internal.ExecutableRebrander class [1].
Before jpackage edits an .exe file, it prints to the console the following message:
```
Warning: Windows Defender may prevent jpackage from functioning. If there is an issue, it can be addressed by either disabling realtime monitoring, or adding an exclusion for the directory <TMPDIR>.
```
where <TMPDIR> is the directory where jpackage assembles the output package.
This warning is merely helpful when the user uses the "--temp" option and has control over the jpackage's work directory. This is an uncommon scenario. This warning makes little to no sense when jpackage creates a new, unique work directory.
Rework ExecutableRebrander class so that instead of printing the warning, it would perform its operation on .exe files with retries.
[1] https://github.com/openjdk/jdk/blob/e0b040a6c6713827033e9ba51c9ded920dd0203b/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/ExecutableRebrander.java
- links to
-
Review(master)
openjdk/jdk/29906