geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r665725 - /geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/setjavaenv.bat
Date Mon, 09 Jun 2008 15:48:52 GMT
Author: dwoods
Date: Mon Jun  9 08:48:52 2008
New Revision: 665725

URL: http://svn.apache.org/viewvc?rev=665725&view=rev
Log:
GERONIMO-4093 Update setjavaenv for Windows to handle spaces in the JAVA_HOME and JRE_HOME
paths and to properly quote _RUNJAVA.

Modified:
    geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/setjavaenv.bat

Modified: geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/setjavaenv.bat
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/setjavaenv.bat?rev=665725&r1=665724&r2=665725&view=diff
==============================================================================
--- geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/setjavaenv.bat
(original)
+++ geronimo/server/branches/2.1/assemblies/geronimo-boilerplate-minimal/src/main/underlay/bin/setjavaenv.bat
Mon Jun  9 08:48:52 2008
@@ -40,6 +40,20 @@
 @if "%GERONIMO_BATCH_ECHO%" == "on"  echo on
 @if not "%GERONIMO_BATCH_ECHO%" == "on"  echo off
 
+@REM handle spaces in provided paths
+if defined var JAVA_HOME(
+set JAVA_HOME=###%JAVA_HOME%###
+set JAVA_HOME=%JAVA_HOME:"###=%
+set JAVA_HOME=%JAVA_HOME:###"=%
+set JAVA_HOME=%JAVA_HOME:###=%
+@)
+if defined var JRE_HOME(
+set JAVA_HOME=###%JRE_HOME%###
+set JAVA_HOME=%JRE_HOME:"###=%
+set JAVA_HOME=%JRE_HOME:###"=%
+set JAVA_HOME=%JRE_HOME:###=%
+@)
+
 @REM check that either JAVA_HOME or JRE_HOME are set
 set jdkOrJreHomeSet=0
 if not "%JAVA_HOME%" == "" set jdkOrJreHomeSet=1
@@ -74,20 +88,6 @@
 @REM default JRE_HOME to JAVA_HOME if not set.
 if "%JRE_HOME%" == "" set JRE_HOME=%JAVA_HOME%\jre
 
-if not "%BASEDIR%" == "" goto gotBasedir
-echo The BASEDIR environment variable is not defined
-echo This environment variable is needed to run this program
-set ERRORLEVEL=1
-goto end
-
-:gotBasedir
-if exist "%BASEDIR%\bin\setjavaenv.bat" goto okBasedir
-echo The BASEDIR environment variable is not defined correctly
-echo This environment variable is needed to run this program
-set ERRORLEVEL=1
-goto end
-
-:okBasedir
 @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.
@@ -95,8 +95,6 @@
 set _RUNJAVAW="%JRE_HOME%\bin\javaw"
 set _RUNJDB="%JAVA_HOME%\bin\jdb"
 
-goto end
-
 :end
 @REM pause the batch file if GERONIMO_BATCH_PAUSE is set to 'on'
 if "%GERONIMO_BATCH_PAUSE%" == "on" pause



Mime
View raw message