blob: 139aff7ac08a237a1d1095087988dae17d1f4895 [file] [log] [blame]
@echo off
rem ==========================================================================
rem = Copyright 2004 The Apache Software Foundation.
rem =
rem = Licensed under the Apache License, Version 2.0 (the "License");
rem = you may not use this file except in compliance with the License.
rem = You may obtain a copy of the License at
rem =
rem =
rem =
rem = Unless required by applicable law or agreed to in writing, software
rem = distributed under the License is distributed on an "AS IS" BASIS,
rem = WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem = See the License for the specific language governing permissions and
rem = limitations under the License.
rem ==========================================================================
rem runDerby.bat: Script to execute the Derby tool IJ
rem Usage: runDerby script file]
rem Setup:
rem - you should set JAVA_HOME
rem - you can set DERBY_HOME to point to both derby.jar and derbytools.jar
rem - JAVA_OPTS is added to the java command line
rem - DERBY_JAR_DIR, default is the current directory
if not "%JAVA_HOME%" == "" goto setant
rem Default command used to call java.exe; hopefully it's on the path here
if "%_JAVACMD%" == "" set _JAVACMD=java
echo Warning: JAVA_HOME environment variable is not set.
echo If build fails because sun.* classes could not be found
echo you will need to set the JAVA_HOME environment variable
echo to the installation directory of java.
rem Default command used to call java.exe or equivalent
if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java
if "%DERBY_JAR_DIR%" == "" set DERBY_JAR_DIR=.
set _DERBY_JAR=%DERBY_JAR_DIR%\derby.jar;%DERBY_JAR_DIR%\derbytools.jar
rem Attempt to automatically add system classes to _CLASSPATH
rem Use _underscore prefix to not conflict with user's settings
if exist "%JAVA_HOME%\lib\tools.jar" set _CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib\tools.jar
if exist "%JAVA_HOME%\lib\" set _CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib\
@echo on
"%_JAVACMD%" -mx64m %JAVA_OPTS% -classpath "%_CLASSPATH%" -Dij.protocol=jdbc:derby: %1 %2
@echo off
goto end
rem Cleanup environment variables
set _ANT_HOME=
set _ANT_JAR=