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

[macos] file associations don't open the file

XMLWordPrintable

      ADDITIONAL SYSTEM INFORMATION :
      OSX/ Java build 14+36

      A DESCRIPTION OF THE PROBLEM :
      The file associations command in jpackage (--file-associations) does not seem to function when creating packages for OSX. (though it works for Windows and Linux)

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1) Create a basic app with a main method that can output args passed in
      2) Build the app and package it using jpackage, using the --file-associations to associate it with a filetype
      3) Install the app
      4) Create a file of the type that is associated with your app
      5) Double click the file

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The app will be opened, with the file's path passed as an element of the argument array to the main() method.
      ACTUAL -
      The app is opened, but the arguments are empty.

      ---------- BEGIN SOURCE ----------
      Any app with a main method that can output its arguments.
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      None that I have found yet.

      FREQUENCY : always


            kcr Kevin Rushforth
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: