Summary
There are regressions in JAVA_OPTS handling across the v5.x line:
Root Cause
Minimal Reproducer
JAVA_OPTS='-Dfoo="bar baz" -DcronSched="0 */7 * * * *"'
USER_JAVA_OPTS=$(echo "$JAVA_OPTS" | tr '\n' ' ' | tr -s ' ' | xargs)
set -f; eval set -- $USER_JAVA_OPTS; printf '<%s>\n' "$@"
# => quoted args split; cron expression becomes multiple tokens
<-Dfoo=bar>
<baz>
<-DcronSched=0>
<*/7>
<*>
<*>
<*>
<*>
Real CF Failure
2026-05-26T23:15:42.56+0000 [APP/PROC/WEB/0] OUT Invoking pre-start scripts.
2026-05-26T23:15:42.58+0000 [APP/PROC/WEB/0] OUT Created symlink: /home/vcap/app/BOOT-INF/lib/client-certificate-mapper-2.0.1.jar -> /home/vcap/deps/2/client_certificate_mapper/client-certificate-mapper-2.0.1.jar
2026-05-26T23:15:42.58+0000 [APP/PROC/WEB/0] OUT Invoking start command.
2026-05-26T23:15:42.58+0000 [APP/PROC/WEB/0] OUT JVM Memory Configuration: -XX:MaxDirectMemorySize=10M -XX:MaxMetaspaceSize=169241K -XX:ReservedCodeCacheSize=240M -Xss1M -Xmx576230K
2026-05-26T23:15:42.63+0000 [APP/PROC/WEB/0] ERR Error: Could not find or load main class *.1
2026-05-26T23:15:42.63+0000 [APP/PROC/WEB/0] ERR Caused by: java.lang.ClassNotFoundException: *.1
2026-05-26T23:15:42.64+0000 [API/0] OUT Process became ready with guid fe7a5b4a-fba8-48cb-8283-c5a8d1f61132 payload: {"instance"=>"8dcab366-fa64-4dcc-4bad-5f7d", "index"=>0, "cell_id"=>"0b0ac42c-af1a-4963-85a2-dabc9f16253c", "ready"=>true, "version"=>"57f8bb8d-5b81-4b64-8047-c79ab1b62a35"}
2026-05-26T23:15:42.64+0000 [APP/PROC/WEB/0] OUT Exit status 1
Could not find or load main class *.1 is due to the quotes being stripped from -DcronSched="0 */1 * * * *"
Impact
Breaks valid JVM usage such as:
-Dkey="value with spaces"
-DcronSched="0 */7 * * * *"
This is not cron-specific — affects any quoted JVM argument.
Expected
JAVA_OPTS should preserve argument boundaries
- special characters (
|, *, whitespace) must not corrupt or expand arguments
Summary
There are regressions in
JAVA_OPTShandling across the v5.x line:JAVA_OPTScontains|or newlines (as per pre-start scripts fails whenJAVA_OPTScontains special characters #1259)Both behaviours were not present in v4.76.0.
Root Cause
JAVA_OPTScontains special characters #1259):sedsubstitution fails with|/ newlines → JVM options may be dropped or corruptedUSER_JAVA_OPTS=$(echo "$JAVA_OPTS" | tr '\n' ' ' | tr -s ' ' | xargs)xargsremoves quoting → argument boundaries lost → downstream shell parsing splits args and may expand*Minimal Reproducer
Real CF Failure
Could not find or load main class *.1is due to the quotes being stripped from-DcronSched="0 */1 * * * *"Impact
Breaks valid JVM usage such as:
This is not cron-specific — affects any quoted JVM argument.
Expected
JAVA_OPTSshould preserve argument boundaries|,*, whitespace) must not corrupt or expand arguments