JavaPackager icon indicating copy to clipboard operation
JavaPackager copied to clipboard

Incorrect `jvm_path` param used when bundling with `why`

Open ykrasik opened this issue 3 years ago • 2 comments

I'm submitting a…

  • [x] bug report
  • [ ] feature request
  • [ ] other

Short description of the issue/suggestion: Trying to bundle an app with a JRE using why on Windows results in a file that cannot be launched.

That's (partly) because the generated launcher.ini file uses a property jvm_path to point to the jre dir, but the why docs say it should be called jvm_install.

Steps to reproduce the issue/enhancement:

javapackager {
    bundleJre = true
    jrePath = new File(System.properties['java.home'])
    winConfig {
        exeCreationTool = 'why'
    }
}

What is the expected behavior?

What is the current behavior?

Do you have outputs, screenshots, demos or samples which demonstrate the problem or enhancement?

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

  • JavaPackager version: 1.6.7
  • OS version: Windows 11
  • JDK version: 1.8.0_271
  • Build tool:
    • [ ] Maven
    • [x] Gradle

Other information (e.g. related issues, suggestions how to fix, links for us to have context)

ykrasik avatar Aug 02 '22 17:08 ykrasik

Hi @ykrasik! Sorry for my late reply... Yes, you are right, since JavaPackager is using the last why launcher version, but launcher.ini is not updated. Thanks! I'll fix it in 1.7.0

fvarrui avatar Aug 14 '22 07:08 fvarrui

Fixed in issue-250 branch.

fvarrui avatar Aug 17 '22 18:08 fvarrui

JavaPackager 1.7.0 released to Maven Central

fvarrui avatar Feb 08 '23 02:02 fvarrui