Documentation
¶
Overview ¶
Package launcher tokenizes JAVA_OPTS and execs the JVM without invoking a shell. It exists to remove the runtime `eval "exec java $JAVA_OPTS ..."` start command, which lets the shell execute command substitutions and treat metacharacters (&, |, ;, newlines) in user-provided JAVA_OPTS as operators.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildArgs ¶
BuildArgs assembles the full argv for execing the JVM. The resulting slice is [java, <tokenized JAVA_OPTS...>, <trusted args...>], mirroring the order of the previous `exec java $JAVA_OPTS <trusted>` start command. trusted args are produced by the buildpack (classpath, -jar/-cp, main class) and are passed through unchanged; only JAVA_OPTS is tokenized.
func TokenizeJavaOpts ¶
TokenizeJavaOpts splits a JAVA_OPTS string into individual arguments using POSIX shell word-splitting and quote-removal rules, but WITHOUT performing any expansion: variable references ($VAR), command substitutions ($(...) and backticks), globbing, and operators (&, |, ;, <, >) are all treated as ordinary literal text. This yields the same arguments the previous `eval`-based start command produced for normal and quoted inputs, while never executing embedded commands.
An empty or whitespace-only input yields no arguments (nil), so the JVM is never handed a spurious empty argument.
Types ¶
This section is empty.