
@echo off
if (%OS%) == (Windows_NT) setlocal
pushd .
set JA_HOME=d:\oracle\ora81\javavm\jahome
set redirect_to_log_file=YES
set args=

:loop
if (%1) == () goto endCase
if (%1) == (-d) goto change_dir
if (%1) == (-projectDir) goto change_dir
if (%1) == (-verbose) goto noLogging
if (%1) == (-v) goto noLogging
   set args=%args% %1
   shift
   goto loop
:noLogging
   set redirect_to_log_file=NO
   shift
   goto loop
:change_dir
   if exist %2 goto dirIsThere
     echo Fatal error: project directory %2 does not exist
     goto finish
:dirIsThere
   cd /d %2
   shift
   shift
   goto loop
:endCase

set JAVA_HOME_CLASSPATH="%JAVA_HOME%\jre\lib\rt.jar;%JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\lib\classes.zip;%CLASSPATH%"

set JACLASSPATH="%JA_HOME%;d:\oracle\ora81\javavm\lib\jaccelerator.zip;d:\oracle\ora81\javavm\lib\ncomp.zip;%JAVA_HOME_CLASSPATH%"

if (%redirect_to_log_file%) == (NO) goto VERBOSE
echo  "----------------------------------------------------------------------" >> ncomp.log
 echo on
java  -DJA_HOME=%JA_HOME% -DORACLE_HOME=d:\oracle\ora81 -DJA_LIBS_HOME=d:\oracle\ora81 -DJAVA_HOME=%JAVA_HOME% -DJAVA_HOME_CLASSPATH=%JAVA_HOME_CLASSPATH% -classpath %JACLASSPATH% oracle.jaccelerator.Ncomp %args% >> ncomp.log
@echo off
goto finish
:verbose
echo  "----------------------------------------------------------------------"
 echo on
java -DJA_HOME=%JA_HOME% -DORACLE_HOME=d:\oracle\ora81 -DJA_LIBS_HOME=d:\oracle\ora81 -DJAVA_HOME=%JAVA_HOME% -DJAVA_HOME_CLASSPATH=%JAVA_HOME_CLASSPATH% -classpath %JACLASSPATH% oracle.jaccelerator.Ncomp %args%
@echo off

:finish
popd
if (%OS%) == (Windows_NT) endlocal

