Set the default locale for the JVM to English to prevent locale-specific character variations
* introduced the JAVA_LOCALE variable within kc.sh|bat in order to control JVM locale Closes #26438 Signed-off-by: Peter Zaoral <pzaoral@redhat.com>
This commit is contained in:
parent
adf838f81f
commit
f40bf4ca2a
2 changed files with 16 additions and 0 deletions
8
quarkus/dist/src/main/content/bin/kc.bat
vendored
8
quarkus/dist/src/main/content/bin/kc.bat
vendored
|
@ -105,6 +105,14 @@ if not "x%JAVA_ADD_OPENS%" == "x" (
|
|||
)
|
||||
set "JAVA_OPTS=%JAVA_OPTS% %JAVA_ADD_OPENS%"
|
||||
|
||||
@REM Set the default locale for the JVM to English to prevent locale-specific character variations
|
||||
if not "x%JAVA_LOCALE%" == "x" (
|
||||
echo "JAVA_LOCALE already set in environment; overriding default settings with values: %JAVA_LOCALE%"
|
||||
) else (
|
||||
set "JAVA_LOCALE=-Duser.language=en -Duser.country=US"
|
||||
)
|
||||
set "JAVA_OPTS=%JAVA_OPTS% %JAVA_LOCALE%"
|
||||
|
||||
if not "x%JAVA_OPTS_APPEND%" == "x" (
|
||||
echo "Appending additional Java properties to JAVA_OPTS: %JAVA_OPTS_APPEND%"
|
||||
set JAVA_OPTS=%JAVA_OPTS% %JAVA_OPTS_APPEND%
|
||||
|
|
8
quarkus/dist/src/main/content/bin/kc.sh
vendored
8
quarkus/dist/src/main/content/bin/kc.sh
vendored
|
@ -126,6 +126,14 @@ else
|
|||
fi
|
||||
JAVA_OPTS="$JAVA_OPTS $JAVA_ADD_OPENS"
|
||||
|
||||
# Set the default locale for the JVM to English to prevent locale-specific character variations
|
||||
if [ -z "$JAVA_LOCALE" ]; then
|
||||
JAVA_LOCALE="-Duser.language=en -Duser.country=US"
|
||||
else
|
||||
echo "JAVA_LOCALE already set in environment; overriding default settings with values: $JAVA_LOCALE"
|
||||
fi
|
||||
JAVA_OPTS="$JAVA_OPTS $JAVA_LOCALE"
|
||||
|
||||
if [ -n "$JAVA_OPTS_APPEND" ]; then
|
||||
echo "Appending additional Java properties to JAVA_OPTS: $JAVA_OPTS_APPEND"
|
||||
JAVA_OPTS="$JAVA_OPTS $JAVA_OPTS_APPEND"
|
||||
|
|
Loading…
Reference in a new issue