tomcat-cms升级为7.0.85
diff --git a/bin/setclasspath.sh b/bin/setclasspath.sh
index b6c42dd..5232b8e 100755
--- a/bin/setclasspath.sh
+++ b/bin/setclasspath.sh
@@ -19,8 +19,6 @@
 #  Set JAVA_HOME or JRE_HOME if not already set, ensure any provided settings
 #  are valid and consistent with the selected start-up options and set up the
 #  endorsed directory.
-#
-#  $Id: setclasspath.sh 1430568 2013-01-08 22:08:57Z schultz $
 # -----------------------------------------------------------------------------
 
 # Make sure prerequisite environment variables are set
@@ -81,12 +79,20 @@
 
 # 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="$CATALINA_HOME"/endorsed
+  # Java 9 no longer supports the java.endorsed.dirs
+  # system property. Only try to use it if
+  # CATALINA_HOME/endorsed exists.
+  if [ -d "$CATALINA_HOME"/endorsed ]; then
+    JAVA_ENDORSED_DIRS="$CATALINA_HOME"/endorsed
+  fi
 fi
 
-# Set standard commands for invoking Java.
-_RUNJAVA="$JRE_HOME"/bin/java
+# Set standard commands for invoking Java, if not already set.
+if [ -z "$_RUNJAVA" ]; then
+  _RUNJAVA="$JRE_HOME"/bin/java
+fi
 if [ "$os400" != "true" ]; then
-  _RUNJDB="$JAVA_HOME"/bin/jdb
+  if [ -z "$_RUNJDB" ]; then
+    _RUNJDB="$JAVA_HOME"/bin/jdb
+  fi
 fi