mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Maxim Thomas
23.25.2025 4937a154b6da6bccbf0fee21db2806784d8c5f9b
[#465] Fix custom library loading when put to the lib directory (#467)

2 files modified
18 ■■■■ changed files
opendj-server-legacy/resource/bin/_script-util.bat 7 ●●●● patch | view | raw | blame | history
opendj-server-legacy/resource/bin/_script-util.sh 11 ●●●● patch | view | raw | blame | history
opendj-server-legacy/resource/bin/_script-util.bat
@@ -13,7 +13,7 @@
rem
rem Copyright 2008-2010 Sun Microsystems, Inc.
rem Portions Copyright 2011-2016 ForgeRock AS.
rem Portions Copyright 2020-2024 3A Systems, LLC.
rem Portions Copyright 2020-2025 3A Systems, LLC.
set SET_JAVA_HOME_AND_ARGS_DONE=false
set SET_ENVIRONMENT_VARS_DONE=false
@@ -70,11 +70,8 @@
rem it also helps comparing the two paths
FOR /F "delims=" %%i IN ("%INSTALL_ROOT%")  DO set INSTALL_ROOT=%%~dpnxi
FOR /F "delims=" %%i IN ("%INSTANCE_ROOT%") DO set INSTANCE_ROOT=%%~dpnxi
call "%INSTALL_ROOT%\lib\setcp.bat" %INSTALL_ROOT%\lib\bootstrap.jar
call "%INSTALL_ROOT%\lib\setcp.bat" %INSTALL_ROOT%\lib\*
set CLASSPATH=%INSTANCE_ROOT%\classes;%CLASSPATH%
if "%INSTALL_ROOT%" == "%INSTANCE_ROOT%" goto setClassPathWithOpenDJLoggerDone
FOR %%x in ("%INSTANCE_ROOT%\lib\*.jar") DO call "%INSTANCE_ROOT%\lib\setcp.bat" %%x
:setClassPathWithOpenDJLoggerDone
set SET_CLASSPATH_DONE=true
goto scriptBegin
opendj-server-legacy/resource/bin/_script-util.sh
@@ -14,7 +14,7 @@
#
# Copyright 2008-2010 Sun Microsystems, Inc.
# Portions Copyright 2010-2016 ForgeRock AS.
# Portions Copyright 2019-2024 3A Systems, LLC.
# Portions Copyright 2019-2025 3A Systems, LLC.
#
# Display an error message
#
@@ -195,14 +195,7 @@
# Configure the appropriate CLASSPATH for server, using Opend DJ logger.
set_opendj_logger_classpath() {
  CLASSPATH="${INSTANCE_ROOT}/classes"
  CLASSPATH="${CLASSPATH}:${INSTALL_ROOT}/lib/bootstrap.jar"
  if [ "${INSTALL_ROOT}" != "${INSTANCE_ROOT}" ]
  then
    for JAR in "${INSTANCE_ROOT}/lib/"*.jar
    do
      CLASSPATH=${CLASSPATH}:${JAR}
    done
  fi
  CLASSPATH="${CLASSPATH}:${INSTALL_ROOT}/lib/*"
  export CLASSPATH
}