jlink native launcher support

XMLWordPrintable

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

      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)

            Assignee:
            Unassigned
            Reporter:
            Mandy Chung (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: