From: <nr...@us...> - 2008-07-18 19:21:39
|
Revision: 4969 http://jython.svn.sourceforge.net/jython/?rev=4969&view=rev Author: nriley Date: 2008-07-18 19:21:37 +0000 (Fri, 18 Jul 2008) Log Message: ----------- Actually use JYTHON_OPTS; correct error message and properly delete _JYTHON_HOME. Modified Paths: -------------- branches/asm/src/shell/jython.bat Modified: branches/asm/src/shell/jython.bat =================================================================== --- branches/asm/src/shell/jython.bat 2008-07-18 19:20:39 UTC (rev 4968) +++ branches/asm/src/shell/jython.bat 2008-07-18 19:21:37 UTC (rev 4969) @@ -16,6 +16,11 @@ rem ----- Verify and set required environment variables ----------------------- +set _JAVA_CMD=java +if not "%JAVA_HOME%" == "" ( + set _JAVA_CMD="%JAVA_HOME%\bin\java" +) + set _JYTHON_HOME="%JYTHON_HOME%" if not "%JYTHON_HOME%" == "" goto gotHome pushd "%~dp0%\.." @@ -23,32 +28,31 @@ popd :gotHome -if exist %_JYTHON_HOME%/jython.jar goto homeOK -echo Cannot find jython.jar in %_JYTHON_HOME% -echo Try running this batch file from the 'bin' directory of an installed Jython -echo or setting JYTHON_HOME. -goto cleanup - -:homeOK -set _JAVA_CMD=java -if not "%JAVA_HOME%" == "" ( - set _JAVA_CMD=%JAVA_HOME%\bin\java -) - -set _CP=%_JYTHON_HOME%\jython-complete.jar -if not exist %_JYTHON_HOME%\jython.jar goto run +if not exist %_JYTHON_HOME%\jython.jar goto tryComplete rem prefer built version set _CP=%_JYTHON_HOME%\jython.jar for %%j in (%_JYTHON_HOME%\javalib\*.jar) do ( set _CP=!_CP!;"%%j" ) +goto run +:tryComplete +set _CP=%_JYTHON_HOME%\jython-complete.jar +if exist %_JYTHON_HOME%/jython-complete.jar goto run + +echo Cannot find jython.jar or jython-complete.jar in %_JYTHON_HOME% +echo Try running this batch file from the 'bin' directory of an installed Jython +echo or setting JYTHON_HOME. +goto cleanup + +rem ----- Execute the requested command ---------------------------------------- + :run -%_JAVA_CMD% %JAVA_OPTS% -Xss512k -Xbootclasspath/a:%_CP% -Dpython.home=%_JYTHON_HOME% -Dpython.executable="%~f0" -classpath "%CLASSPATH%" org.python.util.jython %* +%_JAVA_CMD% %JAVA_OPTS% -Xss512k -Xbootclasspath/a:%_CP% -Dpython.home=%_JYTHON_HOME% -Dpython.executable="%~f0" -classpath "%CLASSPATH%" org.python.util.jython %JYTHON_OPTS% %* set E=%ERRORLEVEL% :cleanup -set _JYTHON_HOME=%JYTHON_HOME% +set _JYTHON_HOME= set _JAVA_CMD= set _CP= This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |