-
Notifications
You must be signed in to change notification settings - Fork 17
/
dtdanalyzer.bat
executable file
·34 lines (27 loc) · 1.19 KB
/
dtdanalyzer.bat
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
@echo off
rem Figure out DTDANALYZER_HOME, which is the directory in which this script
rem resides. It will not include the trailing backslash.
set SCRIPTDIR=%~dp0
set DTDANALYZER_HOME=%SCRIPTDIR:~0,-1%
rem Add the build directory to the classpath. This script is used both by
rem developers and users. For developers, the .class files in the build
rem directory will be found first. Users don't have a build directory.
set CP="%DTDANALYZER_HOME%\build"
rem Add all the .jar files in the lib subdirectory to the classpath
call :findjars "%DTDANALYZER_HOME%\lib"
rem We're not using log4j yet, but we might in the future. Until then, this
rem shouldn't do any harm.
set LOGCONFIG=file:%DTDANALYZER_HOME%/etc/log4j.properties
rem And, execute! Setting the DTDANALYZER_HOME system property so that
rem the utility can find supplementary files like XSLT, CSS and JS.
java -cp %CP% -Xmx256M "-Dlog4j.configuration=%LOGCONFIG%" ^
"-DDTDANALYZER_HOME=%DTDANALYZER_HOME%" ^
gov.ncbi.pmc.dtdanalyzer.DtdAnalyzer %*
exit /B
rem Subroutines used to add jar files to classpath
:findjars
for %%j in (%1\*.jar) do call :addjar "%%j"
for /D %%d in (%1\*) do call :findjars "%%d"
exit /B
:addjar
set CP=%CP%;%1