GP-2987: Fixing a few launch issues (#4872, Closes #4893)

This commit is contained in:
Ryan Kurtz 2023-01-13 07:50:53 -05:00
parent ffbcbefbfe
commit af042aa2d1
3 changed files with 4 additions and 3 deletions

View File

@ -145,7 +145,7 @@ fi
JAVA_CMD="${JAVA_HOME}/bin/java"
# Get the configurable VM arguments from the launch properties
while IFS= read -r line; do
while IFS=$'\r\n' read -r line; do
VMARGS_FROM_LAUNCH_PROPS+=("$line")
done < <(java -cp "${LS_CPATH}" LaunchSupport "${INSTALL_DIR}" -vmargs)

View File

@ -129,7 +129,7 @@ if "%JAVA_HOME%" == "" (
set "JAVA_CMD=%JAVA_HOME%\bin\java"
:: Get the configurable VM arguments from the launch properties
for /f "delims=*" %%i in ('java -cp "%LS_CPATH%" LaunchSupport "%INSTALL_DIR%" -vmargs') do set VMARG_LIST=%VMARG_LIST% %%i
for /f "delims=*" %%i in ('java -cp "%LS_CPATH%" LaunchSupport "%INSTALL_DIR%" -vmargs') do set VMARG_LIST=!VMARG_LIST! %%i
:: Set Max Heap Size if specified
if not "%MAXMEM%"=="" (

View File

@ -291,7 +291,8 @@ public class LaunchSupport {
return EXIT_FAILURE;
}
javaConfig.getLaunchProperties().getVmArgList().forEach(arg -> System.out.println(arg));
// Force newline style to make cross-platform parsing consistent
javaConfig.getLaunchProperties().getVmArgList().forEach(e -> System.out.print(e + "\r\n"));
return EXIT_SUCCESS;
}
}