File: runExtConnection.bat

package info (click to toggle)
libxalan2-java 2.7.1-5
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 19,468 kB
  • ctags: 26,006
  • sloc: java: 175,784; xml: 28,073; sh: 164; jsp: 43; makefile: 43; sql: 6
file content (132 lines) | stat: -rw-r--r-- 4,693 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
@echo off
rem
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 =     http://www.apache.org/licenses/LICENSE-2.0
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
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         - PARSER_JAR may be set to use alternate parser (default:..\..\..\bin\xercesImpl.jar)
rem	    - DERBY_JAR_DIR, default is the current directory
echo.

if not "%JAVA_HOME%" == "" goto setant
:noJavaHome
rem Default command used to call java.exe; hopefully it's on the path here
if "%_JAVACMD%" == "" set _JAVACMD=java
echo.
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.
echo.

:setant
rem Default command used to call java.exe or equivalent
if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java

rem Default command used to call java.exe or equivalent
if "%_JAVACCMD%" == "" set _JAVACCMD=%JAVA_HOME%\bin\javac


if "%DERBY_JAR_DIR%" == "" set DERBY_JAR_DIR=.
set _DERBY_JAR=%DERBY_JAR_DIR%\derby.jar;%DERBY_JAR_DIR%\derbytools.jar


REM TO Work with JDK 1.3 and JDK 1.4, we will keep the directory
REM component seperate from the JAR name. This way we can use the
REM directory component as part of the Endorsed Dir command line 
REM argument when running under JDK 1.4 this should also work for JDK 1.5

REM The XML Apis are going to be either in the LIB dir for a source
REM release or in the root direcctory for a binary release.

IF EXIST "..\..\..\lib\xercesImpl.jar" goto BIN_DIR_BINRELEASE

:BIN_DIR_SRCRELEASE
 Echo Setting bin JAR directory for a sOurce release
 set _BIN_JAR_DIR=..\..\..\
 goto REPORT_BIN_DIR

:BIN_DIR_BINRELEASE
 echo Setting bin JAR Directory for a binary release
 set _BIN_JAR_DIR=..\..\..\lib

:REPORT_BIN_DIR
Echo Binary JAR Directory: %_BIN_JAR_DIR%
echo .


REM The Parser JAR will be in the Lib Dir for the Source Release and for the
REM Binary Release they are in the root directory.

if exist  "..\..\..\build\xalan.jar" goto XALAN_DIR_BINRELEASE

:XALAN_DIR_SRCRELEASE
 Echo Configuring Xalan for a binary release
 set _XALAN_JAR_DIR=..\..\..\
 goto XALAN_DIR_REPORT

:XALAN_DIR_BINRELEASE  
 Echo Configuring Xalan for source release
 set _XALAN_JAR_DIR=..\..\..\build

:XALAN_DIR_REPORT
Echo Xalan Directory is: %_XALAN_JAR_DIR%
echo .


rem Attempt to automatically add system classes to _CLASSPATH
rem Use _underscore prefix to not conflict with user's settings

set _CLASSPATH=%CLASSPATH%
if exist "%JAVA_HOME%\lib\tools.jar" set _CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib\tools.jar
if exist "%JAVA_HOME%\lib\classes.zip" set _CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib\classes.zip

set _CLASSPATH=%_XALAN_JAR_DIR%\xalan.jar;%_XALAN_JAR_DIR%\serializer.jar;%_BIN_JAR_DIR%\xml-apis.jar;%_BIN_JAR_DIR%\xercesImpl.jar;%_DERBY_JAR%;%_CLASSPATH%

set _CLASSPATH=ext-connection;%_CLASSPATH%

echo Using Classpath: %_CLASSPATH%
echo .

set _ENDORSED_DIR=%_XALAN_JAR_DIR%;%_BIN_JAR_DIR%
echo Setting Endorsed Dir to: %_ENDORSED_DIR% : Note ONLY USed for JDK 1.4
echo .

Echo Compiling the External connection Class
echo %_JAVACCMD% -d ./ext-connection -classpath "%_CLASSPATH%" ./ext-connection/ExternalConnection.java
%_JAVACCMD% -d ./ext-connection -classpath "%_CLASSPATH%" ./ext-connection/ExternalConnection.java

@echo on
"%_JAVACMD%" -mx64m %JAVA_OPTS% -Djava.endorsed.dirs=%_ENDORSED_DIR% -classpath "%_CLASSPATH%" ExternalConnection %1 %2 %3 %4 %5 %6 %7 %8
@echo off

goto end

:end
rem Cleanup environment variables
set _JAVACMD=
set _CLASSPATH=
set _ANT_HOME=
set _ANT_JAR=
set _PARSER_JAR=
set _XML-APIS_JAR=