On 3/3/2025 9:58 PM, Michael Hall wrote:


On Mar 3, 2025, at 1:51 PM, Michael Hall <mik3h...@gmail.com> wrote:



On Mar 3, 2025, at 1:37 PM, Alexey Semenyuk <alexey.semen...@oracle.com> wrote:

Hi Michael,

Thank you for the detailed report! I filed [1] ticket that, I hope, captures all findings from your report. Let me know if anything was missed or misunderstood.

[1] https://bugs.openjdk.org/browse/JDK-8351073

- Alexey


Hello Alexey,

 jpackage should copy them as-is.

It would be nice if this was the case but I think you need to be sure changes are made to the Info.plist to ensure the correct version is indicated in a few places.

Apple offers something like plist buddy that could maybe be used.


Fwiw,

(base) mjh@MacBook-Pro-2 ~ % grep -C 1 CFBundleGetInfoString Info.plist
<string>libjli.dylib</string>
<key>CFBundleGetInfoString</key>
<string>Java SE 23.0.1+11-39</string>
(base) mjh@MacBook-Pro-2 ~ % /usr/libexec/PlistBuddy -c 'set:CFBundleGetInfoString Java SE 25' Info.plist
(base) mjh@MacBook-Pro-2 ~ % /usr/libexec/PlistBuddy -c 'save' Info.plist
Saving...
(base) mjh@MacBook-Pro-2 ~ % grep -C 1 CFBundleGetInfoString Info.plist
<string>libjli.dylib</string>
<key>CFBundleGetInfoString</key>
<string>Java SE 25</string>
Good point about `CFBundleGetInfoString`. Maybe jpackage should set this field with the value of `--description` option. Another finding!

As for editing "Info.plist" from the runtime source, if the directory referenced from `--runtime-image` option is a valid bundle, i.e. has "Contents/MacOS/libjli.dylib", "Contents/Info.plist" files, and "Contents/_CodeSignature" elements, and there are no other options, like `--app-version`, jpackage should use the supplied directory as-is without editing the existing "Info.plist" file. Otherwise, jpackage should create "Info.plist" and make sure the values are consistent, of course.

- Alexey

Reply via email to