https://issues.apache.org/bugzilla/show_bug.cgi?id=46232
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 5 Dec 2008 14:27:57 +0000 (14:27 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 5 Dec 2008 14:27:57 +0000 (14:27 +0000)
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

bin/setclasspath.bat
bin/setclasspath.sh

index 3aa7169..694476d 100755 (executable)
@@ -61,8 +61,11 @@ echo This environment variable is needed to run this program
 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
index f16df9f..73b390c 100755 (executable)
@@ -95,8 +95,11 @@ if [ ! -x "$BASEDIR"/bin/setclasspath.sh ]; then
   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