Broken -Bmac.CFBundleVersion parameter in javapackager
On macOS, the command line parameter -Bmac.CFBundleVersion=<value>
specified in the Oracle utility documentationjavapackager
does not work.
I am using the following command to create a disk image Application.app
from Application.jar
:
javapackager \
-deploy \
-native image \
-srcfiles Application.jar \
-outdir dist \
-outfile Application \
-appclass Application \
-BappVersion=2.0 \
-Bmac.CFBundleVersion=2.0.0 \
-BjvmOptions=-Dapple.laf.useScreenMenuBar=true
A pop-up window opened from the About App item in the menu bar displays the following line:
Application
Version 2.0 (100)
instead
Application
Version 2.0 (2.0.0)
When I check the generated file Application.app/Contents/Info.plist
, I see that I javapackager
read the command line parameter correctly -BappVersion=2.0
to set the key value CFBundleShortVersionString
, but could not read the command line parameter -Bmac.CFBundleVersion=2.0.0
to set the key value CFBundleVersion
:
<key>CFBundleShortVersionString</key>
<string>2.0</string>
<key>CFBundleVersion</key>
<string>100</string>
source to share