RFR: 8289771: jpackage: ResourceEditor error when path is overly long on Windows [v3]

Alexander Matveev almatvee at openjdk.org
Wed Nov 20 00:00:16 UTC 2024


On Tue, 19 Nov 2024 22:07:10 GMT, Alexey Semenyuk <asemenyuk at openjdk.org> wrote:

>> Fix `ResourceEditor` class to handle long paths.
>> 
>> Based on https://github.com/openjdk/jdk/pull/9384 PR.
>> 
>> This repairs app image building on Windows if the path to jpackage temp directory exceeds 260 (`MAX_PATH`) characters. MSI building is still broken and can NOT be repaired due to WiX's limitations.
>> 
>> Repaired scenario when the `--dest` option references a long path on Windows. Previously jpackage would have failed to build MSI package.
>> 
>> Other changes:
>>  - Rename `Executor.setRemovePath()` into `Executor.setRemovePathEnvVar()` to make the method name match the implementation.
>>  - Move the mutable part of `WixPipeline` class into `WixPipeline.Builder` class.
>>  - Fixed minor flaws in "WinL10nTest.java"
>
> Alexey Semenyuk has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Make path guaranteed to be long enough

Looks good with minor comment.

test/jdk/tools/jpackage/windows/WinLongPathTest.java line 38:

> 36: 
> 37: /*
> 38: /* @test

Extra `/`?

-------------

PR Review: https://git.openjdk.org/jdk/pull/22092#pullrequestreview-2447053380
PR Review Comment: https://git.openjdk.org/jdk/pull/22092#discussion_r1849314467


More information about the core-libs-dev mailing list