Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions opendj-server-legacy/resource/bin/_script-util.bat
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,13 @@ set SET_ENVIRONMENT_VARS_DONE=true
"%OPENDJ_JAVA_BIN%" --add-opens java.base/jdk.internal.loader=ALL-UNNAMED --version > NUL 2>&1
set RESULT_CODE=%errorlevel%
if %RESULT_CODE% == 0 set OPENDJ_JAVA_ARGS=%OPENDJ_JAVA_ARGS% --add-opens java.base/jdk.internal.loader=ALL-UNNAMED
"%OPENDJ_JAVA_BIN%" --enable-native-access=ALL-UNNAMED --version > NUL 2>&1
set RESULT_CODE=%errorlevel%
if NOT %RESULT_CODE% == 0 goto skipNativeAccessArg
echo %OPENDJ_JAVA_ARGS% | findstr /C:"--enable-native-access=ALL-UNNAMED" > NUL 2>&1
if %errorlevel% == 0 goto skipNativeAccessArg
set OPENDJ_JAVA_ARGS=%OPENDJ_JAVA_ARGS% --enable-native-access=ALL-UNNAMED
:skipNativeAccessArg
goto scriptBegin

:setTempDir
Expand Down
11 changes: 11 additions & 0 deletions opendj-server-legacy/resource/bin/_script-util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,17 @@ set_environment_vars() {
then
export OPENDJ_JAVA_ARGS="$OPENDJ_JAVA_ARGS --add-exports java.base/sun.security.x509=ALL-UNNAMED --add-exports java.base/sun.security.tools.keytool=ALL-UNNAMED --add-opens java.base/jdk.internal.loader=ALL-UNNAMED"
fi

"${OPENDJ_JAVA_BIN}" --enable-native-access=ALL-UNNAMED --version > /dev/null 2>&1
RESULT_CODE=${?}
if test ${RESULT_CODE} -eq 0
then
case " ${OPENDJ_JAVA_ARGS} " in
*" --enable-native-access=ALL-UNNAMED "*) ;;
*) OPENDJ_JAVA_ARGS="${OPENDJ_JAVA_ARGS} --enable-native-access=ALL-UNNAMED" ;;
esac
export OPENDJ_JAVA_ARGS
fi
}

# Configure the appropriate CLASSPATH for server, using Opend DJ logger.
Expand Down
Loading