Skip to content

Commit

Permalink
[#465] Fix custom library loading when put to the lib directory (#467)
Browse files Browse the repository at this point in the history
  • Loading branch information
maximthomas authored Jan 23, 2025
1 parent 16637a2 commit 4937a15
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
7 changes: 2 additions & 5 deletions opendj-server-legacy/resource/bin/_script-util.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ rem information: "Portions Copyright [year] [name of copyright owner]".
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
Expand Down Expand Up @@ -70,11 +70,8 @@ rem get the absolute paths before building the classpath
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

Expand Down
11 changes: 2 additions & 9 deletions opendj-server-legacy/resource/bin/_script-util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down Expand Up @@ -195,14 +195,7 @@ set_environment_vars() {
# 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
}

Expand Down

0 comments on commit 4937a15

Please sign in to comment.