jpackage custom resources not found

Kustaa Nyholm kustaa.nyholm at
Tue Jan 15 05:08:32 UTC 2019

Seems to work not! Thanks!

Some small quibbles:

The build directory is not kept or used:

Using default package resource Runtime-Info.plist.template [Java Runtime Info.plist]  (add Runtime-Info.plist to the resource-dir to customize)
Kept working directory for debug: /Users/nyholku/EazyCNC-Project/abuildroot
MacBook-Pro:EazyCNC-Project nyholku$ ls /Users/nyholku/EazyCNC-Project/abuildroot
ls: /Users/nyholku/EazyCNC-Project/abuildroot: No such file or directory

Also, what is 'Runtime-Info.plist.template' and why would I want it?

I take it jpackage is not going to build the .dmg and I have to this with standard MacOs tools?
Ok I already do that as the old javapackager generated .dmg did not have the properties I liked
and now way to influence those.

For reference and posterity in case anyone comes hear searching for a worked out sample here is my simplistic test script:


set -e


${PACKAGER} --version

create-image \
--force \
--build-root abuildroot \
--verbose \
--add-modules java.base,java.desktop,,java.sql,java.instrument,java.compiler \
--input buildtest \
--output . \
--name EazyCNC \
--main-jar EazyCNC.jar \
--class eazycnc.Main \
--jvm-args '-Xmx1024m -XX:+UseG1GC -XX:MaxGCPauseMillis=50 -XX:+PrintGC' \
--resource-dir 'javapackager-resources/package/macosx'

'buildtest' is a flat directory that contains all my jars, I will next
figure out if has to be flat or what ever other ways I can use to
organise it better or specify the jars more rationally but as a starting
point that produces correct .app above seems to work for my case.

wbr Kusti

> On 14 Jan 2019, at 15.35, Andy Herrick <andy.herrick at> wrote:
> I can see from the verbose message that you are not using the jpackage from the latest EA2 at
> (run jpackage --version to see what version you are running)
> Did you download the earlier EA and copy it over installed jdk-11.0.1 ?
> In any case the behavior you are trying to use has changed twice (once from javafxpackager in JDK8 to jpackage in EA1 and again from EA1 to EA2).
> With the current EA2, you need to add option "--resource-dir '/Users/nyholku/EazyCNC-Project/javapackager-resources/package/macosx'"
> ( or use a patch relative to the current directory) to say where to load custom resources from.
> With the first EA you needed to put resources in "./package/macosx".  It was looking for custom resources in "package/<platform>" relative to the current working directory, not the input directory (as in javafxpackager)
> /Andy
> On 1/14/2019 5:27 AM, Kustaa Nyholm wrote:
>> Hi,
>> over the weekend I tried to use the EA jpackage from here:
>> I invoke it like this:
>> PACKAGER=/Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home/bin/jpackager
>> ${PACKAGER} \
>> create-image \
>> --build-root build-jpackager \
>> --verbose \
>> --echo-mode \
>> --add-modules java.base,java.desktop \
>> --input /Users/nyholku/EazyCNC-Project/javapackager-resources \
>> --output . \
>> --name EazyCNC \
>> --main-jar EazyCNC.jar \
>> --class eazycnc.Main \
>> But I keep getting these messages:
>> Using default package resource [icon]  (add package/macosx/EazyCNC.icns to the class path to customize)
>> Preparing Info.plist: /Users/nyholku/EazyCNC-Project/./
>> Using default package resource [Application Info.plist]  (add package/macosx/Info.plist to the class path to customize)
>> Using default package resource [Java Runtime Info.plist]  (add package/macosx/Runtime-Info.plist to the class path to customize)
>> even though the resources exist (and worked with JDK8 javapackager):
>> ls /Users/nyholku/EazyCNC-Project/javapackager-resources/package/macosx/Info.plist
>> /Users/nyholku/EazyCNC-Project/javapackager-resources/package/macosx/Info.plist
>> wbr Kusti

More information about the core-libs-dev mailing list