[java-identity-provider COMMIT] in /trunk/idp-distribution/src/main/resources/bin: runclass.bat runclass.sh

noreply at shibboleth.net noreply at shibboleth.net
Thu Oct 9 17:02:35 EDT 2014


Author: scantor
Date: Thu Oct  9 17:02:28 2014
New Revision: 6665

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=6665&view=rev
Log:
IDP-481 - Eliminate looping, and add in bin/lib jars to command line tools

Modified:
    trunk/idp-distribution/src/main/resources/bin/runclass.bat
    trunk/idp-distribution/src/main/resources/bin/runclass.sh

Modified: trunk/idp-distribution/src/main/resources/bin/runclass.bat
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-distribution/src/main/resources/bin/runclass.bat?rev=6665&r1=6664&r2=6665&view=diff
==============================================================================
--- trunk/idp-distribution/src/main/resources/bin/runclass.bat (original)
+++ trunk/idp-distribution/src/main/resources/bin/runclass.bat Thu Oct  9 17:02:28 2014
@@ -21,7 +21,8 @@
   set LOCALCLASSPATH=%CLASSPATH%
 )
 
-set LOCALCLASSPATH=%CLASSPATH%;%~dp0..\war\WEB-INF\lib\*
+set LOCALCLASSPATH=%LOCALCLASSPATH%;%~dp0lib\*
+set LOCALCLASSPATH=%LOCALCLASSPATH%;%~dp0..\war\WEB-INF\lib\*
 
 if exist %JAVA_HOME%\lib\tools.jar (
     set LOCALCLASSPATH=%LOCALCLASSPATH%;%JAVA_HOME%\lib\tools.jar

Modified: trunk/idp-distribution/src/main/resources/bin/runclass.sh
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-distribution/src/main/resources/bin/runclass.sh?rev=6665&r1=6664&r2=6665&view=diff
==============================================================================
--- trunk/idp-distribution/src/main/resources/bin/runclass.sh (original)
+++ trunk/idp-distribution/src/main/resources/bin/runclass.sh Thu Oct  9 17:02:28 2014
@@ -27,18 +27,20 @@
   exit
 fi
 
-LOCALCLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/classes.zip
+if [ -n "$CLASSPATH" ] ; then
+  LOCALCLASSPATH=$CLASSPATH
+fi
 
-# add in the dependency .jar files from the lib directory
-LIBDIR=$LOCATION/../war/WEB-INF/lib
-LIBS=$LIBDIR/*.jar
-for i in $LIBS
-do
-    # if the directory is empty, then it will return the input string
-    # this is stupid, so case for it
-    if [ "$i" != "${LIBS}" ] ; then
-        LOCALCLASSPATH=$LOCALCLASSPATH:"$i"
-    fi
-done
+# add in the dependency .jar files
+LOCALCLASSPATH="$LOCATION/../war/WEB-INF/lib/*":$LOCALCLASSPATH
+LOCALCLASSPATH="$LOCATION/lib/*":$LOCALCLASSPATH
+
+if [ -f "$JAVA_HOME/lib/tools.jar" ] ; then
+    LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar
+fi
+
+if [ -f "$JAVA_HOME/lib/classes.zip" ] ; then
+    LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip
+fi
 
 "$JAVACMD" '-classpath' "$LOCALCLASSPATH" "$@"



More information about the commits mailing list