On 1/14/2019 9:02 AM, Kustaa Nyholm wrote:
Thanks!
I could have sworn I had the correct jpackage in use, turns out I using
referring to jpackager.
When I tried jpackage (copied jpackage from 13 to my 11 jdk) I got:
dyld: Library not loaded: @rpath/libjli.dylib
Referenced from:
/Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home/bin/jpackage
Reason: image not found
so I copied that over from 13 -> 11 and now I get:
Error occurred during initialization of boot layer
java.lang.module.FindException: Module jdk.jpackage not found
I tried to copy that over to 11/legal but that did not solve the problem,
am I doomed to fail if I try to mix and match jpackage from 13 with my 11
installation?
yes, like other jdk tools, jpackage is dependent on the java it is
shipped with.
You need to restore /Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/ to
it's original state and run jpackage from jdk-13.internal with the option:
"--runtime-image
/Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home/"
that way you can use jpackage from JDK-13 to package an app with JDK-11.0.1.
I also noticed you used modular option "--add-modules
java.base,java.desktop" with (possibly) a non-modular app. Unless
EazyCNC.jar is a modular jar, this may be ignored and the app will be
bundled with the entire contents of JDK-11.0.1.
you can avoid that by running jlink first, and creating a minimal
jdk-11.0.1 runtime image for your app, or by building EazyCNC.jar as a
modular app (or as a modular jar which you may have already done for all
I know)
set -v
rm -rf output/EazyCNC min11
/Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home/bin/jlink
--add-modules java.base,java.desktop --output min11
${JDK13_HOME}/jpackage create-image \
--input /Users/nyholku/EazyCNC-Project/javapackager-resources \
--output output \
--name EazyCNC \
--main-jar EazyCNC.jar \
--class eazycnc.Main \
--runtime-image min11 \
--build-root build-jpackager \
--verbose \
/Andy
wbr Kusti
On 14 Jan 2019, at 15.35, Andy Herrick <andy.herr...@oracle.com> wrote:
I can see from the verbose message that you are not using the jpackage from the
latest EA2 at https://jdk.java.net/jpackage/
(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:
https://jdk.java.net/jpackage/
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/./EazyCNC.app/Contents/Info.plist
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