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

jlink native launcher support

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 9
    • Fix Version/s: tbd
    • Component/s: tools
    • Labels:
      None

      Description

      jlink --launcher <name>=<module>[/<mainclass>] creates a launcher for the specified module/main class.

      JDK 9 creates a script to run java -m <module>[/<mainclass>]. An enhancement is to create a native launcher to replace the script.

      One idea is to have a prebuilt a tool launcher executable that reads a @argfile for the application. For example, jlink --launcher foo=org.foo/org.foo.Main

      This will create a launcher $java.home/bin/foo and $java.home/bin/.foo_argfile
      where .foo_argfile contains the VM options and -m org.foo/org.foo.Main.

      Another alternative Jon suggests is to have the tool launcher to read from a static char array that will be patched by jlink to include the VM options plus the module/mainclass information.

      The challenge would be for cross-platform linking and also ensure the prebuilt tool launcher executable supports the version of the target platform (likely that this executable may need to be copied from java.base.jmod)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                mchung Mandy Chung
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated: