jpackage EA Build 0

Andy Herrick andy.herrick at oracle.com
Mon Dec 17 22:39:37 UTC 2018


On 12/17/2018 12:45 PM, Scott Palmer wrote:
> 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
>
OK - I can now get this error when specifying an absolute path to the 
main jar (even if it is within the input dir).

I will fix this messaging.


>
> 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?

This is wrong in the help output - will fix.

the value of the --icon option is a path, either absolute or relative to 
the working directory jpackage is run from.  It need not be in the 
--input dir, or listed in the --files option.

/Andy

> I complete example for each of the sample usages shown by "package 
> --help" would go a long way.
>
>
> Scott
>


More information about the core-libs-dev mailing list