Index: setclasspath.bat =================================================================== --- setclasspath.bat (revision 1616700) +++ setclasspath.bat (working copy) @@ -65,11 +65,18 @@ set "JAVA_ENDORSED_DIRS=%BASEDIR%\endorsed" :gotEndorseddir +rem Don't override _RUNJAVA if the user has set it previously +if not "%_RUNJAVA%" == "" goto gotRunJava rem Set standard command for invoking Java. rem Note that NT requires a window name argument when using start. rem Also note the quoting as JAVA_HOME may contain spaces. set _RUNJAVA="%JRE_HOME%\bin\java" +:gotRunJava + +rem Don't override _RUNJDB if the user has set it previously +if not "%_RUNJAVA%" == "" goto gotRunJdb set _RUNJDB="%JAVA_HOME%\bin\jdb" +:gotRunJdb goto end Index: setclasspath.sh =================================================================== --- setclasspath.sh (revision 1616700) +++ setclasspath.sh (working copy) @@ -110,8 +110,12 @@ fi fi -# Set standard commands for invoking Java. -_RUNJAVA="$JRE_HOME"/bin/java -if [ "$os400" != "true" ]; then - _RUNJDB="$JAVA_HOME"/bin/jdb +# Set standard commands for invoking Java, if not already set. +if [ -z "$_RUNJAVA" ]; then + _RUNJAVA="$JRE_HOME"/bin/java + if [ "$os400" != "true" ]; then + if [ -z "$_RUNJDB" ]; then + _RUNJDB="$JAVA_HOME"/bin/jdb + fi + fi fi