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

Re-examine entry point support in jlink

XMLWordPrintable

    • b150
    • Verified

      Currently jlink generates launcher scripts/batch files for all modules with "ModuleMainClass" class file attribute. But, jlink should allow better control of launcher command generation.

      jlink should add --launcher option. jlink --launcher command line option forms:
       
          --launcher $COMMAND=$MODULE
          --launcher $COMMAND=$MODULE/$CLASS
       
       With the short form of the option, jlink will create a launcher named "$COMMAND" that invokes the main class of the given "$MODULE", which must have a "MainClass" attribute.
       
      If a module does not have such an attribute user can still ask jlink to create a launcher for it via the longer form. (latter)
       
      If --launcher is not used, then jlink will not create a launcher command,
      even if one of your root modules has a "ModuleMainClass" class file attribute.
       
      --launcher can be repeated as many as times as needed.
       
      If specified module is not found, jlink will print an error message. If specified module does not have "ModuleMainClass" class file attribute and user did not specify main class in --launcher command option, jlink will print an error message.
       

            sundar Sundararajan Athijegannathan
            alanb Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: