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

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 8u20
    • 8u20
    • deploy
    • Ubuntu x64

      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>

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

              Created:
              Updated:
              Resolved:
              Imported: