升级Tomcat版本 apache-tomcat-7.0.85
diff --git a/tomcat-uidm/bin/bootstrap.jar b/tomcat-uidm/bin/bootstrap.jar
index 4f9dad0..31a10e2 100644
--- a/tomcat-uidm/bin/bootstrap.jar
+++ b/tomcat-uidm/bin/bootstrap.jar
Binary files differ
diff --git a/tomcat-uidm/bin/catalina-tasks.xml b/tomcat-uidm/bin/catalina-tasks.xml
index 1ecb94f..4e6a8ae 100644
--- a/tomcat-uidm/bin/catalina-tasks.xml
+++ b/tomcat-uidm/bin/catalina-tasks.xml
@@ -1,39 +1,39 @@
-<?xml version="1.0"?>

-<!--

- Licensed to the Apache Software Foundation (ASF) under one or more

-  contributor license agreements.  See the NOTICE file distributed with

-  this work for additional information regarding copyright ownership.

-  The ASF licenses this file to You under the Apache License, Version 2.0

-  (the "License"); you may not use this file except in compliance with

-  the License.  You may obtain a copy of the License at

-

-      http://www.apache.org/licenses/LICENSE-2.0

-

-  Unless required by applicable law or agreed to in writing, software

-  distributed under the License is distributed on an "AS IS" BASIS,

-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

-  See the License for the specific language governing permissions and

-  limitations under the License.

--->

-<!--

-  XML file for importing Catalina ant tasks.

-  <import file="${catalina.home}/bin/catalina-tasks.xml"/>

--->

-

-<project name="catalina-tasks">

-  <description>Catalina Ant Manager, JMX and JSPC Tasks</description>

-  <!-- set catalina.home if it's not already set -->

-  <dirname property="catalina.home.bin.dir" file="${ant.file.catalina-tasks}"/>

-  <property name="catalina.home" value="${catalina.home.bin.dir}/.."/>

-  <typedef resource="org/apache/catalina/ant/catalina.tasks">

-    <classpath>

-      <fileset file="${catalina.home}/bin/tomcat-juli.jar"/>

-      <fileset dir="${catalina.home}/lib" includes="*.jar"/>

-    </classpath>

-  </typedef>

-  <typedef resource="org/apache/catalina/ant/jmx/jmxaccessor.tasks">

-    <classpath>

-      <fileset file="${catalina.home}/lib/catalina-ant.jar"/>

-    </classpath>

-  </typedef>

-</project>

+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!--
+  XML file for importing Catalina ant tasks.
+  <import file="${catalina.home}/bin/catalina-tasks.xml"/>
+-->
+
+<project name="catalina-tasks">
+  <description>Catalina Ant Manager, JMX and JSPC Tasks</description>
+  <!-- set catalina.home if it's not already set -->
+  <dirname property="catalina.home.bin.dir" file="${ant.file.catalina-tasks}"/>
+  <property name="catalina.home" value="${catalina.home.bin.dir}/.."/>
+  <typedef resource="org/apache/catalina/ant/catalina.tasks">
+    <classpath>
+      <fileset file="${catalina.home}/bin/tomcat-juli.jar"/>
+      <fileset dir="${catalina.home}/lib" includes="*.jar"/>
+    </classpath>
+  </typedef>
+  <typedef resource="org/apache/catalina/ant/jmx/jmxaccessor.tasks">
+    <classpath>
+      <fileset file="${catalina.home}/lib/catalina-ant.jar"/>
+    </classpath>
+  </typedef>
+</project>
diff --git a/tomcat-uidm/bin/catalina.bat b/tomcat-uidm/bin/catalina.bat
index 859ca9b..e70c14a 100644
--- a/tomcat-uidm/bin/catalina.bat
+++ b/tomcat-uidm/bin/catalina.bat
@@ -67,6 +67,7 @@
 rem                   containing some jars in order to allow replacement of APIs

 rem                   created outside of the JCP (i.e. DOM and SAX from W3C).

 rem                   It can also be used to update the XML parser implementation.

+rem                   Note that Java 9 no longer supports this feature.

 rem                   Defaults to $CATALINA_HOME/endorsed.

 rem

 rem   JPDA_TRANSPORT  (Optional) JPDA transport used when the "jpda start"

@@ -200,6 +201,23 @@
 set LOGGING_MANAGER=-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager

 :noJuliManager

 

+rem Java 9 no longer supports the java.endorsed.dirs

+rem system property. Only try to use it if

+rem JAVA_ENDORSED_DIRS was explicitly set

+rem or CATALINA_HOME/endorsed exists.

+set ENDORSED_PROP=ignore.endorsed.dirs

+if "%JAVA_ENDORSED_DIRS%" == "" goto noEndorsedVar

+set ENDORSED_PROP=java.endorsed.dirs

+goto doneEndorsed

+:noEndorsedVar

+if not exist "%CATALINA_HOME%\endorsed" goto doneEndorsed

+set ENDORSED_PROP=java.endorsed.dirs

+:doneEndorsed

+

+rem Configure JAVA 9 specific start-up parameters

+set "JDK_JAVA_OPTIONS=%JDK_JAVA_OPTIONS% --add-opens=java.base/java.lang=ALL-UNNAMED"

+set "JDK_JAVA_OPTIONS=%JDK_JAVA_OPTIONS% --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED"

+

 rem ----- Execute The Requested Command ---------------------------------------

 

 echo Using CATALINA_BASE:   "%CATALINA_BASE%"

@@ -316,17 +334,17 @@
 rem Execute Java with the applicable properties

 if not "%JPDA%" == "" goto doJpda

 if not "%SECURITY_POLICY_FILE%" == "" goto doSecurity

-%_EXECJAVA% %LOGGING_CONFIG% %LOGGING_MANAGER% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%

+%_EXECJAVA% %LOGGING_CONFIG% %LOGGING_MANAGER% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -D%ENDORSED_PROP%="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%

 goto end

 :doSecurity

-%_EXECJAVA% %LOGGING_CONFIG% %LOGGING_MANAGER% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%

+%_EXECJAVA% %LOGGING_CONFIG% %LOGGING_MANAGER% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -D%ENDORSED_PROP%="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%

 goto end

 :doJpda

 if not "%SECURITY_POLICY_FILE%" == "" goto doSecurityJpda

-%_EXECJAVA% %LOGGING_CONFIG% %LOGGING_MANAGER% %JAVA_OPTS% %JPDA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%

+%_EXECJAVA% %LOGGING_CONFIG% %LOGGING_MANAGER% %JAVA_OPTS% %JPDA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -D%ENDORSED_PROP%="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%

 goto end

 :doSecurityJpda

-%_EXECJAVA% %LOGGING_CONFIG% %LOGGING_MANAGER% %JAVA_OPTS% %JPDA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%

+%_EXECJAVA% %LOGGING_CONFIG% %LOGGING_MANAGER% %JAVA_OPTS% %JPDA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -D%ENDORSED_PROP%="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%

 goto end

 

 :end

diff --git a/tomcat-uidm/bin/catalina.sh b/tomcat-uidm/bin/catalina.sh
old mode 100644
new mode 100755
index 33a4803..fa39688
--- a/tomcat-uidm/bin/catalina.sh
+++ b/tomcat-uidm/bin/catalina.sh
@@ -62,6 +62,7 @@
 #                   containing some jars in order to allow replacement of APIs
 #                   created outside of the JCP (i.e. DOM and SAX from W3C).
 #                   It can also be used to update the XML parser implementation.
+#                   Note that Java 9 no longer supports this feature.
 #                   Defaults to $CATALINA_HOME/endorsed.
 #
 #   JPDA_TRANSPORT  (Optional) JPDA transport used when the "jpda start"
@@ -245,6 +246,18 @@
   LOGGING_MANAGER="-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
 fi
 
+# Java 9 no longer supports the java.endorsed.dirs
+# system property. Only try to use it if
+# JAVA_ENDORSED_DIRS was explicitly set
+# or CATALINA_HOME/endorsed exists.
+ENDORSED_PROP=ignore.endorsed.dirs
+if [ -n "$JAVA_ENDORSED_DIRS" ]; then
+    ENDORSED_PROP=java.endorsed.dirs
+fi
+if [ -d "$CATALINA_HOME/endorsed" ]; then
+    ENDORSED_PROP=java.endorsed.dirs
+fi
+
 # Uncomment the following line to make the umask available when using the
 # org.apache.catalina.security.SecurityListener
 #JAVA_OPTS="$JAVA_OPTS -Dorg.apache.catalina.security.SecurityListener.UMASK=`umask`"
@@ -261,6 +274,11 @@
     _NOHUP=nohup
 fi
 
+# Add the JAVA 9 specific start-up parameters required by Tomcat
+JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --add-opens=java.base/java.lang=ALL-UNNAMED"
+JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED"
+export JDK_JAVA_OPTIONS
+
 # ----- Execute The Requested Command -----------------------------------------
 
 # Bugzilla 37848: only output this if we have a TTY
@@ -308,7 +326,8 @@
       fi
       shift
       exec "$_RUNJDB" "$LOGGING_CONFIG" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
-        -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
+        -D$ENDORSED_PROP="$JAVA_ENDORSED_DIRS" \
+        -classpath "$CLASSPATH" \
         -sourcepath "$CATALINA_HOME"/../../java \
         -Djava.security.manager \
         -Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \
@@ -318,7 +337,8 @@
         org.apache.catalina.startup.Bootstrap "$@" start
     else
       exec "$_RUNJDB" "$LOGGING_CONFIG" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
-        -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
+        -D$ENDORSED_PROP="$JAVA_ENDORSED_DIRS" \
+        -classpath "$CLASSPATH" \
         -sourcepath "$CATALINA_HOME"/../../java \
         -Dcatalina.base="$CATALINA_BASE" \
         -Dcatalina.home="$CATALINA_HOME" \
@@ -336,7 +356,8 @@
     fi
     shift
     eval exec "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
-      -Djava.endorsed.dirs="\"$JAVA_ENDORSED_DIRS\"" -classpath "\"$CLASSPATH\"" \
+      -D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
+      -classpath "\"$CLASSPATH\"" \
       -Djava.security.manager \
       -Djava.security.policy=="\"$CATALINA_BASE/conf/catalina.policy\"" \
       -Dcatalina.base="\"$CATALINA_BASE\"" \
@@ -345,7 +366,8 @@
       org.apache.catalina.startup.Bootstrap "$@" start
   else
     eval exec "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
-      -Djava.endorsed.dirs="\"$JAVA_ENDORSED_DIRS\"" -classpath "\"$CLASSPATH\"" \
+      -D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
+      -classpath "\"$CLASSPATH\"" \
       -Dcatalina.base="\"$CATALINA_BASE\"" \
       -Dcatalina.home="\"$CATALINA_HOME\"" \
       -Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
@@ -402,7 +424,8 @@
     fi
     shift
     eval $_NOHUP "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
-      -Djava.endorsed.dirs="\"$JAVA_ENDORSED_DIRS\"" -classpath "\"$CLASSPATH\"" \
+      -D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
+      -classpath "\"$CLASSPATH\"" \
       -Djava.security.manager \
       -Djava.security.policy=="\"$CATALINA_BASE/conf/catalina.policy\"" \
       -Dcatalina.base="\"$CATALINA_BASE\"" \
@@ -413,7 +436,8 @@
 
   else
     eval $_NOHUP "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \
-      -Djava.endorsed.dirs="\"$JAVA_ENDORSED_DIRS\"" -classpath "\"$CLASSPATH\"" \
+      -D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
+      -classpath "\"$CLASSPATH\"" \
       -Dcatalina.base="\"$CATALINA_BASE\"" \
       -Dcatalina.home="\"$CATALINA_HOME\"" \
       -Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
@@ -465,7 +489,8 @@
   fi
 
   eval "\"$_RUNJAVA\"" $LOGGING_MANAGER $JAVA_OPTS \
-    -Djava.endorsed.dirs="\"$JAVA_ENDORSED_DIRS\"" -classpath "\"$CLASSPATH\"" \
+    -D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
+    -classpath "\"$CLASSPATH\"" \
     -Dcatalina.base="\"$CATALINA_BASE\"" \
     -Dcatalina.home="\"$CATALINA_HOME\"" \
     -Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
@@ -551,7 +576,8 @@
 elif [ "$1" = "configtest" ] ; then
 
     eval "\"$_RUNJAVA\"" $LOGGING_MANAGER $JAVA_OPTS \
-      -Djava.endorsed.dirs="\"$JAVA_ENDORSED_DIRS\"" -classpath "\"$CLASSPATH\"" \
+      -D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \
+      -classpath "\"$CLASSPATH\"" \
       -Dcatalina.base="\"$CATALINA_BASE\"" \
       -Dcatalina.home="\"$CATALINA_HOME\"" \
       -Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \
diff --git a/tomcat-uidm/bin/commons-daemon-native.tar.gz b/tomcat-uidm/bin/commons-daemon-native.tar.gz
index 6d25918..39cfff5 100644
--- a/tomcat-uidm/bin/commons-daemon-native.tar.gz
+++ b/tomcat-uidm/bin/commons-daemon-native.tar.gz
Binary files differ
diff --git a/tomcat-uidm/bin/commons-daemon.jar b/tomcat-uidm/bin/commons-daemon.jar
index 2b6b9c6..173f67f 100644
--- a/tomcat-uidm/bin/commons-daemon.jar
+++ b/tomcat-uidm/bin/commons-daemon.jar
Binary files differ
diff --git a/tomcat-uidm/bin/configtest.sh b/tomcat-uidm/bin/configtest.sh
old mode 100644
new mode 100755
diff --git a/tomcat-uidm/bin/daemon.sh b/tomcat-uidm/bin/daemon.sh
old mode 100644
new mode 100755
index dee6c77..ef9f708
--- a/tomcat-uidm/bin/daemon.sh
+++ b/tomcat-uidm/bin/daemon.sh
@@ -94,6 +94,15 @@
 #
 if [ -z "$JAVA_HOME" ]; then
     JAVA_BIN="`which java 2>/dev/null || type java 2>&1`"
+    while [ -h "$JAVA_BIN" ]; do
+        ls=`ls -ld "$JAVA_BIN"`
+        link=`expr "$ls" : '.*-> \(.*\)$'`
+        if expr "$link" : '/.*' > /dev/null; then
+            JAVA_BIN="$link"
+        else
+            JAVA_BIN="`dirname $JAVA_BIN`/$link"
+        fi
+    done
     test -x "$JAVA_BIN" && JAVA_HOME="`dirname $JAVA_BIN`"
     test ".$JAVA_HOME" != . && JAVA_HOME=`cd "$JAVA_HOME/.." >/dev/null; pwd`
 else
@@ -172,6 +181,18 @@
     fi
 fi
 
+# Java 9 no longer supports the java.endorsed.dirs
+# system property. Only try to use it if
+# JAVA_ENDORSED_DIRS was explicitly set
+# or CATALINA_HOME/endorsed exists.
+ENDORSED_PROP=ignore.endorsed.dirs
+if [ -n "$JAVA_ENDORSED_DIRS" ]; then
+    ENDORSED_PROP=java.endorsed.dirs
+fi
+if [ -d "$CATALINA_HOME/endorsed" ]; then
+    ENDORSED_PROP=java.endorsed.dirs
+fi
+
 # ----- Execute The Requested Command -----------------------------------------
 case "$1" in
     run     )
@@ -186,7 +207,7 @@
       -errfile "&2" \
       -classpath "$CLASSPATH" \
       "$LOGGING_CONFIG" $JAVA_OPTS $CATALINA_OPTS \
-      -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \
+      -D$ENDORSED_PROP="$JAVA_ENDORSED_DIRS" \
       -Dcatalina.base="$CATALINA_BASE" \
       -Dcatalina.home="$CATALINA_HOME" \
       -Djava.io.tmpdir="$CATALINA_TMP" \
@@ -203,7 +224,7 @@
       -errfile "&1" \
       -classpath "$CLASSPATH" \
       "$LOGGING_CONFIG" $JAVA_OPTS $CATALINA_OPTS \
-      -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \
+      -D$ENDORSED_PROP="$JAVA_ENDORSED_DIRS" \
       -Dcatalina.base="$CATALINA_BASE" \
       -Dcatalina.home="$CATALINA_HOME" \
       -Djava.io.tmpdir="$CATALINA_TMP" \
@@ -215,7 +236,7 @@
       -stop \
       -pidfile "$CATALINA_PID" \
       -classpath "$CLASSPATH" \
-      -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \
+      -D$ENDORSED_PROP="$JAVA_ENDORSED_DIRS" \
       -Dcatalina.base="$CATALINA_BASE" \
       -Dcatalina.home="$CATALINA_HOME" \
       -Djava.io.tmpdir="$CATALINA_TMP" \
diff --git a/tomcat-uidm/bin/digest.sh b/tomcat-uidm/bin/digest.sh
old mode 100644
new mode 100755
diff --git a/tomcat-uidm/bin/setclasspath.bat b/tomcat-uidm/bin/setclasspath.bat
index da0d8a3..2cf4610 100644
--- a/tomcat-uidm/bin/setclasspath.bat
+++ b/tomcat-uidm/bin/setclasspath.bat
@@ -67,7 +67,10 @@
 :okJava

 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

+rem Java 9 no longer supports the java.endorsed.dirs

+rem system property. Only try to use it if

+rem CATALINA_HOME/endorsed exists.

+if not exist "%CATALINA_HOME%\endorsed" goto gotEndorseddir

 set "JAVA_ENDORSED_DIRS=%CATALINA_HOME%\endorsed"

 :gotEndorseddir

 

diff --git a/tomcat-uidm/bin/setclasspath.sh b/tomcat-uidm/bin/setclasspath.sh
old mode 100644
new mode 100755
index 873fad3..5232b8e
--- a/tomcat-uidm/bin/setclasspath.sh
+++ b/tomcat-uidm/bin/setclasspath.sh
@@ -79,8 +79,12 @@
 
 # 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, if not already set.
@@ -91,4 +95,4 @@
   if [ -z "$_RUNJDB" ]; then
     _RUNJDB="$JAVA_HOME"/bin/jdb
   fi
-fi
\ No newline at end of file
+fi
diff --git a/tomcat-uidm/bin/shutdown.sh b/tomcat-uidm/bin/shutdown.sh
old mode 100644
new mode 100755
diff --git a/tomcat-uidm/bin/startup.sh b/tomcat-uidm/bin/startup.sh
old mode 100644
new mode 100755
diff --git a/tomcat-uidm/bin/tomcat-juli.jar b/tomcat-uidm/bin/tomcat-juli.jar
index 51e0c19..995d3e5 100644
--- a/tomcat-uidm/bin/tomcat-juli.jar
+++ b/tomcat-uidm/bin/tomcat-juli.jar
Binary files differ
diff --git a/tomcat-uidm/bin/tomcat-native.tar.gz b/tomcat-uidm/bin/tomcat-native.tar.gz
index 0f2e787..2b47ef1 100644
--- a/tomcat-uidm/bin/tomcat-native.tar.gz
+++ b/tomcat-uidm/bin/tomcat-native.tar.gz
Binary files differ
diff --git a/tomcat-uidm/bin/tool-wrapper.bat b/tomcat-uidm/bin/tool-wrapper.bat
index fcff6da..331d42e 100644
--- a/tomcat-uidm/bin/tool-wrapper.bat
+++ b/tomcat-uidm/bin/tool-wrapper.bat
@@ -36,6 +36,7 @@
 rem                   containing some jars in order to allow replacement of APIs

 rem                   created outside of the JCP (i.e. DOM and SAX from W3C).

 rem                   It can also be used to update the XML parser implementation.

+rem                   Note that Java 9 no longer supports this feature.

 rem                   Defaults to $CATALINA_HOME/endorsed.

 rem ---------------------------------------------------------------------------

 

@@ -82,6 +83,19 @@
 

 set JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager

 

+rem Java 9 no longer supports the java.endorsed.dirs

+rem system property. Only try to use it if

+rem JAVA_ENDORSED_DIRS was explicitly set

+rem or CATALINA_HOME/endorsed exists.

+set ENDORSED_PROP=ignore.endorsed.dirs

+if "%JAVA_ENDORSED_DIRS%" == "" goto noEndorsedVar

+set ENDORSED_PROP=java.endorsed.dirs

+goto doneEndorsed

+:noEndorsedVar

+if not exist "%CATALINA_HOME%\endorsed" goto doneEndorsed

+set ENDORSED_PROP=java.endorsed.dirs

+:doneEndorsed

+

 rem Get remaining unshifted command line arguments and save them in the

 set CMD_LINE_ARGS=

 :setArgs

@@ -91,6 +105,6 @@
 goto setArgs

 :doneSetArgs

 

-%_RUNJAVA% %JAVA_OPTS% %TOOL_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.home="%CATALINA_HOME%" org.apache.catalina.startup.Tool %CMD_LINE_ARGS%

+%_RUNJAVA% %JAVA_OPTS% %TOOL_OPTS% -D%ENDORSED_PROP%="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.home="%CATALINA_HOME%" org.apache.catalina.startup.Tool %CMD_LINE_ARGS%

 

 :end

diff --git a/tomcat-uidm/bin/tool-wrapper.sh b/tomcat-uidm/bin/tool-wrapper.sh
old mode 100644
new mode 100755
index 31cebf6..54ea0fc
--- a/tomcat-uidm/bin/tool-wrapper.sh
+++ b/tomcat-uidm/bin/tool-wrapper.sh
@@ -37,6 +37,7 @@
 #                   containing some jars in order to allow replacement of APIs
 #                   created outside of the JCP (i.e. DOM and SAX from W3C).
 #                   It can also be used to update the XML parser implementation.
+#                   Note that Java 9 no longer supports this feature.
 #                   Defaults to $CATALINA_HOME/endorsed.
 # -----------------------------------------------------------------------------
 
@@ -129,11 +130,24 @@
   JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"`
 fi
 
+# Java 9 no longer supports the java.endorsed.dirs
+# system property. Only try to use it if
+# JAVA_ENDORSED_DIRS was explicitly set
+# or CATALINA_HOME/endorsed exists.
+ENDORSED_PROP=ignore.endorsed.dirs
+if [ -n "$JAVA_ENDORSED_DIRS" ]; then
+    ENDORSED_PROP=java.endorsed.dirs
+fi
+if [ -d "$CATALINA_HOME/endorsed" ]; then
+    ENDORSED_PROP=java.endorsed.dirs
+fi
+
 JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
 
 # ----- Execute The Requested Command -----------------------------------------
 
 exec "$_RUNJAVA" $JAVA_OPTS $TOOL_OPTS \
-  -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
+  -D$ENDORSED_PROP="$JAVA_ENDORSED_DIRS" \
+  -classpath "$CLASSPATH" \
   -Dcatalina.home="$CATALINA_HOME" \
   org.apache.catalina.startup.Tool "$@"
diff --git a/tomcat-uidm/bin/version.sh b/tomcat-uidm/bin/version.sh
old mode 100644
new mode 100755