Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8166835

javapackager and fx:deploy bundle the whole JDK instead of JRE

XMLWordPrintable

    • x86
    • os_x

      FULL PRODUCT VERSION :
      java version "1.8.0_92"
      Java(TM) SE Runtime Environment (build 1.8.0_92-b14)
      Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Mac Ox X 10.11.5 - El Capitan

      A DESCRIPTION OF THE PROBLEM :
      Using javapackager as follows:

      javapackager -deploy -v -native dmg -outdir OUT_DIR -outfile MyApp.app -srcfiles myapp.jar -appclass myapp.Main -name MyApp

      This produces working app in the dmg, but the app contains the whole JDK, instead of JRE, making the DMG 100Mb biiger than it should be.

      If I dowload separate jre, and use -Bruntime=jre_to_bundle/, the result is as expected.
      The same command in windows, with -native msi , produces the expected result : app that has only JRE.

      The same applies for fx:deploy except that there is no way to specify -Bruntime parameter.
      After some digging around the fxdeploy task sources, I found that I can pass basedir="jre_to_bundle/" to fx:platform, but this fails with the following error :

      Can not find JDK artifacts in specified location: /Users/myuser/dev/myapp/jre_to_bundle/Contents/Home


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      dmg/ macos app that has JRE bundled
      ACTUAL -
      dmg/ macos app has JDK bundled instead

      REPRODUCIBILITY :
      This bug can be reproduced always.

            pardesha Pardeep Sharma
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: