javajavafxjavapackager

Finding the relative path with javapackager -BlicenseFile=


I'm having trouble understanding why

javapackager -deploy -native installer -BlicenseFile=license.rtf [...]

command will not find the file license.rtf.

The license.rtf file is in the root of the JAR. The packager builds the native installers when the -BlicenseFile argument is missing. But refuses when the argument is given. Can anyone help?

The application is JavaFX 8.


Solution

  • use this

    javapackager -deploy -native installer -srcfiles license.rtf -BlicenseFile=license.rtf [...]
    

    if you really claim it is in the root directory,

    the -srcfiles addition adds the licensefile to the temp directory that javapackager uses to bundle your binaries