Don't override the endorsed dir if the user has set it
Based on a patch by Russ Tokuyama
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@723738
13f79535-47bb-0310-9956-
ffa450edef68
goto exit
:okBasedir
+rem Don't override the endorsed dir if the user has set it previously
+if not "%JAVA_ENDORSED_DIRS" == "" goto gotEndorseddir
rem Set the default -Djava.endorsed.dirs argument
set JAVA_ENDORSED_DIRS=%BASEDIR%\endorsed
+:gotEndorseddir
rem Set standard CLASSPATH
rem Note that there are no quotes as we do not want to introduce random
fi
fi
-# Set the default -Djava.endorsed.dirs argument
-JAVA_ENDORSED_DIRS="$BASEDIR"/endorsed
+# Don't override the endorsed dir if the user has set it previously
+if [-z "$JAVA_ENDORSED_DIRS"]; then
+ # Set the default -Djava.endorsed.dirs argument
+ JAVA_ENDORSED_DIRS="$BASEDIR"/endorsed
+fi
# Set standard CLASSPATH
if [ "$1" = "javac" ] ; then