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

Error: Unknown Argument thrown by javpackager when argument values are passed with multiple words with in quotation

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2
    • 9
    • 9
    • deploy
    • 9
    • linux, os_x
    • Verified

    Description

      [Mac Developer Build 10/05/2016]

      Totally there are four tests in this bug
      1. Test for argument -Barguments
      2. Test for argument -BlicenseType
      3. Test for argument -description
      4. Test for argument -Blinux.deb.maintainer
      Please find the attachment "com.greetings.jar" for simple normal jar.

      ISSUE OBSERVED: Mutliple words within quotation (single or double quotation) are not accepted by some of javapackager arguments.

      =====================================================================================================================
      TEST ONE: This is a Test for `javapackager -Barguments="Value" ' for e.g. -Barguments="[this.is.a.test=tru one.more.arg=affirmative]"
      =====================================================================================================================

      ===============
      JDK 9 EXECUTION
      ===============

      java -version
      java version "9-internal"
      Java(TM) SE Runtime Environment (fastdebug build 9-internal+0-2016-10-04-145039.cbensen.jdk9udev)
      Java HotSpot(TM) 64-Bit Server VM (fastdebug build 9-internal+0-2016-10-04-145039.cbensen.jdk9udev, mixed mode)

      Steps to reproduce:

      SCENARIO ONE:

      try the below command at command line with JDK9.
      javapackager -deploy -verbose -outdir outdir -outfile test -native pkg -Bclasspath=com.greetings.jar -appclass com.greetings.App1 -name SQE-DEFAULT-PARAMS-TEST-APP -srcdir jars -srcfiles com.greetings.jar -BmainJar=com.greetings.jar -Barguments="[this.is.a.test=tru one.more.arg=affirmative]"
      Exception in thread "main" com.sun.javafx.tools.packager.PackagerException: Error: Unknown argument: one.more.arg=affirmative]
              at com.sun.javafx.tools.packager.Main.main(jdk.packager/Main.java:367)


      In Contrast Check the execution in JDK8, it is working fine.

      ================
      JDK 8 EXECUTION
      ================
      java -version
      java version "1.8.0_122-ea"
      Java(TM) SE Runtime Environment (build 1.8.0_122-ea-b01)
      Java HotSpot(TM) 64-Bit Server VM (build 25.122-b01, mixed mode)

      javapackager -version
      Java Packager version 8.0

      SCENARIO TWO:
      try the below command at command line with JDK8.
      javapackager -deploy -verbose -outdir outdir -outfile test -native pkg -Bclasspath=com.greetings.jar -appclass com.greetings.App1 -name SQE-DEFAULT-PARAMS-TEST-APP -srcdir jars -srcfiles com.greetings.jar -BmainJar=com.greetings.jar -Barguments="[this.is.a.test=tru one.more.arg=affirmative]"

      Above Command executes successfully in JDK8.
      check the attachment "default_arguments_test.txt" for complete log of JDK8 execution.
      =====================================================================================================================

      =====================================================================================================================
      TEST TWO: This is a Test for 'javapackager -BlicenseType="<SomeValue>" ' for e.g. -BlicenseType="SQE GPL v.100.500"
      =====================================================================================================================

      ===============
      JDK 9 EXECUTION
      ===============

      java -version
      java version "9-internal"
      Java(TM) SE Runtime Environment (fastdebug build 9-internal+0-2016-10-04-145039.cbensen.jdk9udev)
      Java HotSpot(TM) 64-Bit Server VM (fastdebug build 9-internal+0-2016-10-04-145039.cbensen.jdk9udev, mixed mode)

      Steps to reproduce:

      SCENARIO ONE:

      try the below command at command line with JDK9.
      javapackager -deploy -verbose -outdir outdir -outfile test -native pkg -BlicenseType="SQE GPL v.100.500" -Bcopyright="Copyright (c) 2011, 2016 Oracle and/or its affiliates. All rights reserved." -Bclasspath=com.greetings.jar -appclass com.greetings.App1 -name LicenseTest -srcdir jars -srcfiles com.greetings.jar -BmainJar=com.greetings.jar
      Exception in thread "main" com.sun.javafx.tools.packager.PackagerException: Error: Unknown argument: GPL
              at com.sun.javafx.tools.packager.Main.main(jdk.packager/Main.java:367)


      In Contrast Check the execution in JDK8, it is working fine.

      ================
      JDK 8 EXECUTION
      ================
      java -version
      java version "1.8.0_122-ea"
      Java(TM) SE Runtime Environment (build 1.8.0_122-ea-b01)
      Java HotSpot(TM) 64-Bit Server VM (build 25.122-b01, mixed mode)

      javapackager -version
      Java Packager version 8.0

      SCENARIO TWO:
      try the below command at command line with JDK8.
       javapackager -deploy -verbose -outdir outdir -outfile test -native pkg -BlicenseType="SQE GPL v.100.500" -Bcopyright="Copyright (c) 2011, 2016 Oracle and/or its affiliates. All rights reserved." -Bclasspath=com.greetings.jar -appclass com.greetings.App1 -name LicenseTest -srcdir jars -srcfiles com.greetings.jar -BmainJar=com.greetings.jar

       
      Above Command executes successfully in JDK8.
      check the attachment "licensetype.txt" for complete log of JDK8 execution.
      ====================================================================================================================

      ====================================================================================================================
      TEST THREE: This is a Test for 'javapackager -description '<SomeValue>' command for e.g. javapackager -description 'Caramba service!'
      ====================================================================================================================

      ===============
      JDK 9 EXECUTION
      ===============

      java -version
      java version "9-internal"
      Java(TM) SE Runtime Environment (fastdebug build 9-internal+0-2016-10-04-145039.cbensen.jdk9udev)
      Java HotSpot(TM) 64-Bit Server VM (fastdebug build 9-internal+0-2016-10-04-145039.cbensen.jdk9udev, mixed mode)

      Steps to reproduce:

      SCENARIO ONE:

      try the below command at command line with JDK9.

      javapackager -deploy -verbose -outdir outdir -outfile test -native pkg -Bclasspath=com.greetings.jar -appclass com.greetings.App1 -name ServiceHintTest -description 'Caramba service!' -srcdir jars -srcfiles com.greetings.jar -BmainJar=com.greetings.jar -daemon -BstartOnInstall=true -BrunAtStartup=true
      Exception in thread "main" com.sun.javafx.tools.packager.PackagerException: Error: Unknown argument: service!
              at com.sun.javafx.tools.packager.Main.main(jdk.packager/Main.java:367)


      In Contrast Check the execution in JDK8, it is working fine.

      ================
      JDK 8 EXECUTION
      ================
      java -version
      java version "1.8.0_122-ea"
      Java(TM) SE Runtime Environment (build 1.8.0_122-ea-b01)
      Java HotSpot(TM) 64-Bit Server VM (build 25.122-b01, mixed mode)

      javapackager -version
      Java Packager version 8.0

      SCENARIO TWO:
      try the below command at command line with JDK8.

      javapackager -deploy -verbose -outdir outdir -outfile test -native pkg -Bclasspath=com.greetings.jar -appclass com.greetings.App1 -name ServiceHintTest -description 'Caramba service!' -srcdir jars -srcfiles com.greetings.jar -BmainJar=com.greetings.jar -daemon -BstartOnInstall=true -BrunAtStartup=true
       
      Above Command executes successfully in JDK8.
      check the attachment "servicehint.txt" for complete log of JDK8 execution.
      ======================================================================================================================

      ======================================================================================================================
      TEST FOUR: This is a Test for 'javapackager --Blinux.deb.maintainer='<SomeValue>' command for e.g. javapackager -Blinux.deb.maintainer="Oracle Inc."'
      ======================================================================================================================

      ===============
      JDK 9 EXECUTION
      ===============

      java -version
      java version "9-internal"
      Java(TM) SE Runtime Environment (fastdebug build 9-internal+0-2016-10-04-145039.cbensen.jdk9udev)
      Java HotSpot(TM) 64-Bit Server VM (fastdebug build 9-internal+0-2016-10-04-145039.cbensen.jdk9udev, mixed mode)

      Steps to reproduce:

      SCENARIO ONE:

      try the below command at command line with JDK9.

      javapackager -deploy -verbose -outdir outdir -outfile test -native rpm -Blinux.deb.maintainer="Oracle Inc." -Bclasspath=com.greetings.jar -appclass com.greetings.App1 -name LinuxSpecificTest -srcdir jars -srcfiles com.greetings.jar -BmainJar=com.greetings.jar -Blinux.bundleName=fooBar
      Exception in thread "main" com.sun.javafx.tools.packager.PackagerException: Error: Unknown argument: Inc.
              at com.sun.javafx.tools.packager.Main.main(jdk.packager/Main.java:367)


      In Contrast Check the execution in JDK8, it is working fine.

      ================
      JDK 8 EXECUTION
      ================
      java -version
      java version "1.8.0_122-ea"
      Java(TM) SE Runtime Environment (build 1.8.0_122-ea-b01)
      Java HotSpot(TM) 64-Bit Server VM (build 25.122-b01, mixed mode)

      javapackager -version
      Java Packager version 8.0

      SCENARIO TWO:
      try the below command at command line with JDK8.
      javapackager -deploy -verbose -outdir outdir -outfile test -native rpm -Blinux.deb.maintainer="Oracle Inc." -Bclasspath=com.greetings.jar -appclass com.greetings.App1 -name LinuxSpecificTest -srcdir jars -srcfiles com.greetings.jar -BmainJar=com.greetings.jar -Blinux.bundleName=fooBar
       
      Above Command executes successfully in JDK8.
      check the attachment "linux_deb_mainter_test.txt" for complete log of JDK8 execution.
      =====================================================================================================================



      Attachments

        Issue Links

          Activity

            People

              vdrozdov Victor Drozdov (Inactive)
              rgangadhar Ramesh Gangadhar
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: