jpackage EA Build 0
Scott Palmer
swpalmer at gmail.com
Mon Dec 17 17:45:36 UTC 2018
I finally got to the point where I can play with this…
I’m just using trial and error, trying to figure out what to do based on the output of package --help and responding to error messages to guide me.
I’ve already used jlink to create a runtime (including JavaFX) that I want to use with my non-modular application. I’ve put a bunch of files that my application requires in an ‘app’ folder
/Library/Java/JavaVirtualMachines/jdk-12.jdk/Contents/Home/bin/jpackage create-installer --input /Users/scott/dev/AdminApp/build/image/app, --runtime-image /Users/scott/dev/AdminApp/build/image/runtime --output /Users/scott/dev/AdminApp/build/installer --build-root /Users/scott/dev/AdminApp/build/tmpInst --name "Server Admin" --main-jar /Users/scott/dev/AdminApp/build/libs/AdminApp-1.0.4.jar —class my.company.serveradmin.ServerAdminApp
Bundler Mac App Store Ready Bundler skipped because of a configuration problem: java.lang.RuntimeException: File /Library/Java/JavaVirtualMachines/jdk-12.jdk/Contents/Home/jmods does not belong to /Users/scott/dev/AdminApp/build/image/app
Bundler DMG Installer skipped because of a configuration problem: java.lang.RuntimeException: File /Library/Java/JavaVirtualMachines/jdk-12.jdk/Contents/Home/jmods does not belong to /Users/scott/dev/AdminApp/build/image/app
Bundler PKG Installer skipped because of a configuration problem: java.lang.RuntimeException: File /Library/Java/JavaVirtualMachines/jdk-12.jdk/Contents/Home/jmods does not belong to /Users/scott/dev/AdminApp/build/image/app
I don’t understand the error message. What is it complaining about?
I figured out that I was using the wrong value for the --main-jar .. I needed the name relative to my input folder, so I changed that and it produced output, but the error message I got above was not at all helpful.
Then I looked at the directory structure of the application bundle. My input directory looked like
app/
libs/
<all my jars here>
But the ‘libs’ subfolder was missing from the produced bundle. All the jars that were in it were placed directly in the ‘Java’ folder of the app bundle.
So then I added a README.txt file under /app as a sibling of the libs folder. That caused the bundled structure to match what I had, with a README.txt and ‘libs’ folder containing all my jars, all located in the ‘Java’ folder of the application bundle.
I think that inconsistent layout should be corrected.
It would be good to document what is expected in the input directory, how those files are used, and where they end up in the output directory. --icon says it takes the icon file name (not a path), but I don’t want to install the icon file as a separate discrete file in my application, so where is it looking for it?
I complete example for each of the sample usages shown by "package --help" would go a long way.
Scott
> On Dec 14, 2018, at 7:46 AM, Andy Herrick <andy.herrick at oracle.com> wrote:
>
> I am pleased to announce that the first EA build of jpackage is now available at : https://jdk.java.net/jpackage/
>
> This is an early access build of JEP 343: Packaging Tool <https://openjdk.java.net/jeps/343>, aimed at testing a prototype implementation of jpackage,
>
> This build is intended for developers interested in jpackage, and is provided as a convenience so that they don't need to build from the source code <https://hg.openjdk.java.net/jdk/sandbox> (branch="JDK-8200758-branch").
>
> Warning: This build is based on an incomplete version of JDK 12 <https://openjdk.java.net/projects/jdk/12/>.
>
> Please send feedback via e-mail to core-libs-dev at openjdk.java.net
>
> /Andy
>
More information about the core-libs-dev
mailing list