# Common shell routines for Java launcher scripts

## AddToClasspath
# Adds the list of specified names
# to the CLASSPATH environment variable.
# Only the names that exist as files or directories will
# be added.
#
AddToClasspath() {
    for p in "$@"; do
	if [ ! -e "$p" ]; then
	    continue
	fi
	if [ -n "$CLASSPATH" ]; then
	    CLASSPATH=$CLASSPATH:$p
	else
	    CLASSPATH=$p
	    export CLASSPATH
	fi
    done
}
