From: <nr...@us...> - 2008-07-15 22:33:08
|
Revision: 4950 http://jython.svn.sourceforge.net/jython/?rev=4950&view=rev Author: nriley Date: 2008-07-15 15:33:04 -0700 (Tue, 15 Jul 2008) Log Message: ----------- (Partial) Windows port of Jython launcher script; should work on Windows 2000 and later. Added Paths: ----------- branches/asm/src/shell/jython.bat Added: branches/asm/src/shell/jython.bat =================================================================== --- branches/asm/src/shell/jython.bat (rev 0) +++ branches/asm/src/shell/jython.bat 2008-07-15 22:33:04 UTC (rev 4950) @@ -0,0 +1,57 @@ +@echo off +rem --------------------------------------------------------------------------- +rem jython.bat - start script for Jython (adapted from jruby.bat) +rem +rem Environment variables (optional) +rem +rem JAVA_HOME Java installation directory +rem +rem JYTHON_HOME Jython installation directory +rem +rem JYTHON_OPTS Default Jython command line arguments +rem +rem --------------------------------------------------------------------------- + +setlocal enabledelayedexpansion + +rem ----- Verify and set required environment variables ----------------------- + +set _JYTHON_HOME="%JYTHON_HOME%" +if not "%JYTHON_HOME%" == "" goto gotHome +pushd "%~dp0%\.." +set _JYTHON_HOME="%CD%" +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 +rem prefer built version +set _CP=%_JYTHON_HOME%\jython.jar +for %%j in (%_JYTHON_HOME%\javalib\*.jar) do ( + echo %%j + set _CP=!_CP!;"%%j" +) + +:run +%_JAVA_CMD% %JAVA_OPTS% -Xss512k -Xbootclasspath/a:%_CP% -Dpython.home=%_JYTHON_HOME% -Dpython.executable="%~f0" -classpath "%CLASSPATH%" org.python.util.jython %* +set E=%ERRORLEVEL% + +:cleanup +set _JYTHON_HOME=%JYTHON_HOME% +set _JAVA_CMD= +set _CP= + +:finish +exit /b %E% \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |