File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -849,7 +849,15 @@ JAVA_OPTS="$JAVA_OPTS ${JAVA_MEM-} ${JAVA_STACK-}"
849849
850850JFFI_OPTS=" -Djffi.boot.library.path=$JRUBY_HOME /lib/jni"
851851
852- CLASSPATH=" ${CP-}${CP_DELIMITER}${CLASSPATH-} "
852+ if [ -n " ${CP-} " ]; then
853+ if [ -n " ${CLASSPATH-} " ]; then
854+ CLASSPATH=" ${CP-}${CP_DELIMITER}${CLASSPATH-} "
855+ else
856+ CLASSPATH=" ${CP-} "
857+ fi
858+ else
859+ CLASSPATH=" ${CLASSPATH-} "
860+ fi
853861
854862# ----- Module and Class Data Sharing flags for Java 9+ -----------------------
855863
989997
990998prepend java_args " $JAVACMD "
991999
1000+ classpath_value=$CLASSPATH
9921001if $NO_BOOTCLASSPATH || $VERIFY_JRUBY ; then
9931002 if $use_modules ; then
9941003 # Use module path instead of classpath for the jruby libs
995- append java_args --module-path " $JRUBY_CP " -classpath " $CLASSPATH "
1004+ append java_args --module-path " $JRUBY_CP "
9961005 else
997- append java_args -classpath " $JRUBY_CP$CP_DELIMITER$CLASSPATH "
1006+ classpath_value=" $JRUBY_CP$CP_DELIMITER$classpath_value "
1007+ # Trim extra delimiter we might have appended
1008+ classpath_value=" ${classpath_value% " $CP_DELIMITER " } "
9981009 fi
9991010else
10001011 append java_args -Xbootclasspath/a:" $JRUBY_CP "
1001- append java_args -classpath " $CLASSPATH "
1002- append java_args -Djruby.home=" $JRUBY_HOME "
1012+ fi
1013+
1014+ if [ -n " $classpath_value " ]; then
1015+ append java_args -classpath " $classpath_value "
10031016fi
10041017
10051018append java_args -Djruby.home=" $JRUBY_HOME " \
You can’t perform that action at this time.
0 commit comments