Skip to main content

Module java_launcher

Module java_launcher 

Source
Expand description

The Windows java launcher’s wildcard expansion of application arguments, which ktfmt and ktlint get before their main runs: an argument with an unquoted * or ? becomes the matching entries of its parent directory. Ports JDK 21 cmdtoargs.c (next_arg, JLI_CmdToArgs), java_md.c (CreateApplicationArgs) and LauncherHelper.expandArgs. Other platforms pass arguments through (the shell expands there).

Functions§

application_args
The program’s arguments without its name, as the drop-ins’ JVM main would receive them.
expand_application_args
CreateApplicationArgs: expands an argument only where the launcher’s own split of command_line has the same text with an unquoted wildcard; when the two splits disagree on the count, everything is passed as is.