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

jlink native launcher support

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 9
    • 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)

            igraves Ian Graves
            mchung Mandy Chung (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: