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

[Bundlers] javafxpackager fails to bundle with silent NPE when -Bclasspath=<relative path1>:<relative path1> options passed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8u20
    • Fix Version/s: 8u20
    • Component/s: deploy
    • Environment:

      Ubuntu x64

      Description

      When bundling with CLI packager, we're getting such a message if relative classpath is mentioned (which, I'm sure, is the normal way to pass classpath):

      16:27 [/tmp/testBundlerWorkDir/jars] $ "/home/dginzburg/jdk/bin/javafxpackager" -deploy -srcdir /tmp/testBundlerWorkDir/jars "-verbose" "-outdir" "/tmp/testBundlerWorkDir" "-outfile" "test" "-native" "image" "-Bclasspath=Util.jar:testFxAppWithUtil.jar" "-srcfiles" testFxAppWithUtil.jar Util.jar "-appclass" "testapp.App1"
      No base JDK. Package will use system JRE.
      Bundler Lunix Application Image skipped because of a configuration problem: java.lang.NullPointerException

      Everything should work here: the classpath is correctly relative to current $PWD and srcdir (passed with -srcdir).
      Also this example works when classpath is passed this way to ant ('<fx:bundleArgument arg="classpath" value="Util.jar:testFxAppWithUtil.jar"/>') or for bundling with Java API.

      The same thing works when passing classpath in absolute paths:
      16:40 [/tmp/testBundlerWorkDir/jars] $ "/home/dginzburg/jdk/bin/javafxpackager" -deploy -srcdir /tmp/testBundlerWorkDir/jars "-verbose" "-outdir" "/tmp/testBundlerWorkDir" "-outfile" "test" "-native" image "-Bclasspath=/tmp/testBundlerWorkDir/jars/Util.jar:/tmp/testBundlerWorkDir/jars/testFxAppWithUtil.jar" "-srcfiles" testFxAppWithUtil.jar Util.jar "-appclass" "testapp.App1"
      No base JDK. Package will use system JRE.
      Creating app bundle: /tmp/testBundlerWorkDir/bundles/App1
      16:40 [/tmp/testBundlerWorkDir/jars] $ ../bundles/App1/App1
      Hello World initialized!
      -Dapp.preferences.id=testapp
      PASS_1
      JREVersion: 1.8.0_20-ea-b10

      or without classpath at all:
      16:42 [/tmp/testBundlerWorkDir/jars] $ "/home/dginzburg/jdk/bin/javafxpackager" -deploy -srcdir /tmp/testBundlerWorkDir/jars "-verbose" "-outdir" "/tmp/testBundlerWorkDir" "-outfile" "test" "-native" image "-srcfiles" testFxAppWithUtil.jar Util.jar "-appclass" "testapp.App1"
      No base JDK. Package will use system JRE.
      Creating app bundle: /tmp/testBundlerWorkDir/bundles/App1
      16:42 [/tmp/testBundlerWorkDir/jars] $ ../bundles/App1/App1
      Hello World initialized!
      Exception in Application start method
      <exception while starting because of missing Util.jar in classpath>

        Attachments

          Activity

            People

            Assignee:
            shemnon Danno Ferrin (Inactive)
            Reporter:
            dginzbur Dmitry Ginzburg (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported: