KEYCLOAK - 9923 - add-user-keycloak detect if Java uses modules (JDK 9+)

This commit is contained in:
slominskir 2019-04-03 15:17:18 -04:00 committed by Bruno Oliveira da Silva
parent a63efd872d
commit 8dd96d6962
2 changed files with 13 additions and 0 deletions

View file

@ -46,6 +46,12 @@ if "x%JAVA_HOME%" == "x" (
set "JAVA=%JAVA_HOME%\bin\java" set "JAVA=%JAVA_HOME%\bin\java"
) )
rem set default modular jvm parameters
setlocal EnableDelayedExpansion
call "!DIRNAME!common.bat" :setDefaultModularJvmOptions "!JAVA_OPTS!"
set "JAVA_OPTS=!JAVA_OPTS! !DEFAULT_MODULAR_JVM_OPTIONS!"
setlocal DisableDelayedExpansion
rem Find jboss-modules.jar, or we can't continue rem Find jboss-modules.jar, or we can't continue
if exist "%JBOSS_HOME%\jboss-modules.jar" ( if exist "%JBOSS_HOME%\jboss-modules.jar" (
set "RUNJAR=%JBOSS_HOME%\jboss-modules.jar" set "RUNJAR=%JBOSS_HOME%\jboss-modules.jar"

View file

@ -7,6 +7,9 @@
# #
DIRNAME=`dirname "$0"` DIRNAME=`dirname "$0"`
GREP="grep"
. "$DIRNAME/common.sh"
# OS specific support (must be 'true' or 'false'). # OS specific support (must be 'true' or 'false').
cygwin=false; cygwin=false;
@ -47,6 +50,10 @@ if [ "x$JAVA" = "x" ]; then
fi fi
fi fi
# Set default modular JVM options
setDefaultModularJvmOptions $JAVA_OPTS
JAVA_OPTS="$JAVA_OPTS $DEFAULT_MODULAR_JVM_OPTIONS"
if [ "x$JBOSS_MODULEPATH" = "x" ]; then if [ "x$JBOSS_MODULEPATH" = "x" ]; then
JBOSS_MODULEPATH="$JBOSS_HOME/modules" JBOSS_MODULEPATH="$JBOSS_HOME/modules"
fi fi