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

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

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      os_x

      Description

      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.

        Activity

        Hide
        pardesha Pardeep Sharma added a comment -
        The submitter reports that using javapackager or fx:deploy to create a dmg based app, bundles the whole JDK instead of JRE. However, if he downloads separate JRE, and use -Bruntime=jre_to_bundle/, the result is as expected. Not sure if this is an expected behavior. Current documentation does nor clarify the expected results.
        Ref: http://docs.oracle.com/javase/8/docs/technotes/tools/unix/javapackager.html
        Show
        pardesha Pardeep Sharma added a comment - The submitter reports that using javapackager or fx:deploy to create a dmg based app, bundles the whole JDK instead of JRE. However, if he downloads separate JRE, and use -Bruntime=jre_to_bundle/, the result is as expected. Not sure if this is an expected behavior. Current documentation does nor clarify the expected results. Ref: http://docs.oracle.com/javase/8/docs/technotes/tools/unix/javapackager.html
        Hide
        pardesha Pardeep Sharma added a comment -
        Closing this as won't Fix based upon discussion with development.
        Show
        pardesha Pardeep Sharma added a comment - Closing this as won't Fix based upon discussion with development.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: