bug jpackage in JDK 15

Michael Hall mik3hall at gmail.com
Sun Jan 24 14:27:37 UTC 2021

> On Jan 24, 2021, at 7:37 AM, Michael Hall <mik3hall at gmail.com> wrote:
> --name 'VARS Annotation’ 
> You are using a name with an embedded blank but that didn’t seem to cause me any problems.
> I didn’t recreate, maybe if I get a chance I’ll try to see if anything else in your invocation seems to trigger what you’re seeing.

This is about as close to yours as I think I can get and I didn’t recreate, it is how I run mine shell script…


set -e


${PACKAGER} --version

echo 'remove prior dist'
rm -rf outputdir
mkdir outputdir

#	--install-dir outputdir \
#   --add-modules java.desktop,java.prefs,java.se \

	--verbose \
	--type app-image \
	--input ./input \
	--dest outputdir \
	--app-version 1.0.0  \
	--name BlackJack\ Blastoff \
	--main-jar bjb.jar \
	--main-class org.bjb.BlackJackApp \
	--runtime-image /Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home \
	--java-options '-Xmx1024m -XX:+UseG1GC -XX:MaxGCPauseMillis=50  -Dapple.laf.useScreenMenuBar=true -Dcom.apple.mrj.application.apple.menu.about.name=BlackjackBlastoff -Dapple.awt.application.name=Blackjack\ Blastoff' \
	--icon /Users/mjh/HalfPipe/HalfPipe_jpkg/GenericApp.icns
#	--mac-sign \
#	--mac-signing-key-user-name "Michael Hall”

I think is about everything you had except different —java-options, mine of course excluding your modular related.

ls "outputdir/BlackJack Blastoff.app”


ls "outputdir/BlackJack Blastoff.app/Contents"
Info.plist	MacOS		PkgInfo		Resources	app		runtime

If you use /usr/libexec/java_home you can get the current jdk and not need to hardcode the path into JavaVirtualMachines. It looks like you only maintain one version of the JDK, the release appeared stripped in your path? This also allows you to run other versions if you want like…

/usr/libexec/java_home -v 14 --exec jpackage --version
WARNING: Using incubator modules: jdk.incubator.jpackage

If of interest to anyone I still haven’t figured out signing. It errored giving some indication that the JDK had already been signed? I posted that sometime back. I keep meaning to look at what there is for testing but haven’t yet. Any thoughts on that would still be appreciated.

More information about the core-libs-dev mailing list