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

value for key "LSApplicationCategoryType" is not set in Info.plist when trying to set through javapackager -BapplicationCategory="<SomeValue>"

    XMLWordPrintable

Details

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

    Description

      [Mac developer build: 10/04/2016]
      Please find the attachment for simple normal jar (com.greetings.jar)

      Steps to reproduce

      ==========================================================
      JDK9 EXECUTION
      ==========================================================
      NOT WORKING SCENARIO

      ---------------------------------------------------------------------------------------------
      STEP 1.
      ---------------------------------------------------------------------------------------------

       try to execute the following command at command line
      javapackager -deploy -verbose -srcdir jars -srcfiles com.greetings.jar -BmainJar=com.greetings.jar -Bclasspath=com.greetings.jar -native dmg -outdir outdir -outfile test -BapplicationCategory=SomeCategory -name CategoryTestJDK9 -appclass com.greetings.App1

      check the attachment log "categoryJDK9.txt" for successfull execution of javapackager command.

      ---------------------------------------------------------------------------------------------
      STEP 2.
      ---------------------------------------------------------------------------------------------

      install "dmg" file in mac using command
      hdiutil attach /export/home/gtee/ramesh/outdir/CategoryTestJDK9-1.0.dmg

      Checksumming Protective Master Boot Record (MBR : 0)…
      Protective Master Boot Record (MBR :: verified CRC32 $AB890C57
      Checksumming GPT Header (Primary GPT Header : 1)…
       GPT Header (Primary GPT Header : 1): verified CRC32 $22472931
      Checksumming GPT Partition Data (Primary GPT Table : 2)…
      GPT Partition Data (Primary GPT Tabl: verified CRC32 $CD1AE0EE
      Checksumming (Apple_Free : 3)…
                          (Apple_Free : 3): verified CRC32 $00000000
      Checksumming disk image (Apple_HFS : 4)…
      ...................................................................................................................................................................................................
                disk image (Apple_HFS : 4): verified CRC32 $7C08CB75
      Checksumming (Apple_Free : 5)…
                          (Apple_Free : 5): verified CRC32 $00000000
      Checksumming GPT Partition Data (Backup GPT Table : 6)…
      GPT Partition Data (Backup GPT Table: verified CRC32 $CD1AE0EE
      Checksumming GPT Header (Backup GPT Header : 7)…
        GPT Header (Backup GPT Header : 7): verified CRC32 $64D96B96
      verified CRC32 $DFC4CC98
      /dev/disk2 GUID_partition_scheme
      /dev/disk2s1 Apple_HFS /Volumes/CategoryTestJDK9


      ---------------------------------------------------------------------------------------------
      STEP 3.
      ---------------------------------------------------------------------------------------------


      Check the Value of Key "LSApplicationCategoryType" in Info.plist
      EXPECTED VALUE: SomeCategory (passed in jdk9 javapackager command line)
      ACTUAL VALUE: public.app-category.developer-tools

      cat /Volumes/CategoryTestJDK9/CategoryTestJDK9.app/Contents/Info.plist
      <?xml version="1.0" ?>
      <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
      <plist version="1.0">
       <dict>
        <key>LSMinimumSystemVersion</key>
        <string>10.7.4</string>
        <key>CFBundleDevelopmentRegion</key>
        <string>English</string>
        <key>CFBundleAllowMixedLocalizations</key>
        <true/>
        <key>CFBundleExecutable</key>
        <string>CategoryTestJDK9</string>
        <key>CFBundleIconFile</key>
        <string>CategoryTestJDK9.icns</string>
        <key>CFBundleIdentifier</key>
        <string>com.example.bad</string>
        <key>CFBundleInfoDictionaryVersion</key>
        <string>6.0</string>
        <key>CFBundleName</key>
        <string>CategoryTestJDK9</string>
        <key>CFBundlePackageType</key>
        <string>APPL</string>
        <key>CFBundleShortVersionString</key>
        <string>1.0</string>
        <key>CFBundleSignature</key>
        <string>????</string>
        <!-- See http://developer.apple.com/library/mac/#releasenotes/General/SubmittingToMacAppStore/_index.html
             for list of AppStore categories -->
        <key>LSApplicationCategoryType</key>
        <string>public.app-category.developer-tools</string>
        <key>CFBundleVersion</key>
        <string>1.0</string>
        <key>NSHumanReadableCopyright</key>
        <string>Copyright (C) 2016</string>
        <key>NSHighResolutionCapable</key>
        <string>true</string>
       </dict>
      </plist>


      Cross verified with JDK8 execution and "SomeCategory" value is observed for key "LSApplicationCategoryType" in Info.plist file
        

      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)

      ==========================================================
      JDK8 EXECUTION
      ==========================================================

      Repeat STEP 1, STEP 2, STEP 3 for JDK8 EXECUTION and you can observe value "SomeCategory" for Key "LsApplicatonCategoryType" in Info.plist


      ---------------------------------------------------------------------------------------------
      STEP 4
      ---------------------------------------------------------------------------------------------


      try the following command at command line with JDK8.

      javapackager -deploy -verbose -srcdir jars -srcfiles com.greetings.jar -BmainJar=com.greetings.jar -Bclasspath=com.greetings.jar -native dmg -outdir outdir -outfile test -BapplicationCategory=SomeCategory -name CategoryTestJDK8 -appclass com.greetings.App1

      Check the attachment "CategoryJDK8.txt" for successfull execution of JDK8 javapacakger command.

      ---------------------------------------------------------------------------------------------
      STEP 5
      ---------------------------------------------------------------------------------------------

      install bundler dmg file into mac system using following command line.

      hdiutil attach /export/home/gtee/ramesh/outdir/bundles/CategoryTestJDK8-1.0.dmg

      Checksumming Protective Master Boot Record (MBR : 0)…
      Protective Master Boot Record (MBR :: verified CRC32 $A731BE91
      Checksumming GPT Header (Primary GPT Header : 1)…
       GPT Header (Primary GPT Header : 1): verified CRC32 $6A3D23B7
      Checksumming GPT Partition Data (Primary GPT Table : 2)…
      GPT Partition Data (Primary GPT Tabl: verified CRC32 $844BF4CC
      Checksumming (Apple_Free : 3)…
                          (Apple_Free : 3): verified CRC32 $00000000
      Checksumming disk image (Apple_HFS : 4)…
      ...................................................................................................................................................................................................
                disk image (Apple_HFS : 4): verified CRC32 $680682C3
      Checksumming (Apple_Free : 5)…
                          (Apple_Free : 5): verified CRC32 $00000000
      Checksumming GPT Partition Data (Backup GPT Table : 6)…
      GPT Partition Data (Backup GPT Table: verified CRC32 $844BF4CC
      Checksumming GPT Header (Backup GPT Header : 7)…
        GPT Header (Backup GPT Header : 7): verified CRC32 $9AF1B4DB
      verified CRC32 $33805036
      /dev/disk3 GUID_partition_scheme
      /dev/disk3s1 Apple_HFS /Volumes/CategoryTestJDK8

      ---------------------------------------------------------------------------------------------
      STEP 6
      ---------------------------------------------------------------------------------------------

      check the value for key "LSApplicationCategoryType" in Info.plist

       cat /Volumes/CategoryTestJDK8/CategoryTestJDK8.app/Contents/Info.plist
      <?xml version="1.0" ?>
      <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
      <plist version="1.0">
       <dict>
        <key>LSMinimumSystemVersion</key>
        <string>10.7.4</string>
        <key>CFBundleDevelopmentRegion</key>
        <string>English</string>
        <key>CFBundleAllowMixedLocalizations</key>
        <true/>
        <key>CFBundleExecutable</key>
        <string>CategoryTestJDK8</string>
        <key>CFBundleIconFile</key>
        <string>CategoryTestJDK8.icns</string>
        <key>CFBundleIdentifier</key>
        <string>com.greetings</string>
        <key>CFBundleInfoDictionaryVersion</key>
        <string>6.0</string>
        <key>CFBundleName</key>
        <string>CategoryTestJDK8</string>
        <key>CFBundlePackageType</key>
        <string>APPL</string>
        <key>CFBundleShortVersionString</key>
        <string>1.0</string>
        <key>CFBundleSignature</key>
        <string>????</string>
        <!-- See http://developer.apple.com/library/mac/#releasenotes/General/SubmittingToMacAppStore/_index.html
             for list of AppStore categories -->
        <key>LSApplicationCategoryType</key>
        <string>SomeCategory</string>
        <key>CFBundleVersion</key>
        <string>1.0</string>
        <key>NSHumanReadableCopyright</key>
        <string>Copyright (C) 2016</string>
        <key>NSHighResolutionCapable</key>
        <string>true</string>
       </dict>
      </plist>

      Attachments

        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: