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

Jean-Noel Rouvignac
15.08.2013 f1ae6b8af754bdae1de0dad0acc54df4c2810b34
OPENDJ-842 On Windows, the setup command hangs when the length of the install path is too long

Code review: csovant

Jars now appear only once in the classpath (they were appearing twice).
INSTALL_ROOT and INSTANCE_ROOT represented the same absolute paths despite having different relative paths, resulting in the jars appended twice to the classpath.
After this change, the paths are using the absolute paths instead of the relative paths.

_script-util.bat:
Fixed jars appearing twice in the classpath
1 files modified
9 ■■■■■ changed files
opends/resource/bin/_script-util.bat 9 ●●●●● patch | view | raw | blame | history
opends/resource/bin/_script-util.bat
@@ -55,14 +55,17 @@
cd /d %CUR_DIR%
goto scriptBegin
:setClassPath
if "%SET_CLASSPATH_DONE%" == "true" goto end
rem get the absolute paths before building the classpath
rem it also helps comparing the two paths
FOR /F %%i IN ("%INSTALL_ROOT%")  DO set INSTALL_ROOT=%%~dpnxi
FOR /F %%i IN ("%INSTANCE_ROOT%") DO set INSTANCE_ROOT=%%~dpnxi
FOR %%x in ("%INSTALL_ROOT%\lib\*.jar") DO call "%INSTALL_ROOT%\lib\setcp.bat" %%x
if "%INSTALL_ROOT%" == "%INSTANCE_ROOT%"goto setClassPathDone
FOR %%x in ("%INSTANCE_ROOT%\lib\*.jar") DO call "%INSTANCE_ROOT%\lib\setcp.bat" %%x
FOR %%x in ("%INSTALL_ROOT%\resources\*.jar") DO call "%INSTALL_ROOT%\lib\setcp.bat" %%x
set CLASSPATH=%INSTANCE_ROOT%\classes;%CLASSPATH%
if "%INSTALL_ROOT%" == "%INSTANCE_ROOT%" goto setClassPathDone
FOR %%x in ("%INSTANCE_ROOT%\lib\*.jar") DO call "%INSTANCE_ROOT%\lib\setcp.bat" %%x
:setClassPathDone
set SET_CLASSPATH_DONE=true
goto scriptBegin