123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145 |
- @echo off
- setlocal
- CD /d %~dp0
- if "%1" == "-java:local" (shift & echo Option -java:local is not supported. Ignore it.)
- goto useEnvVar
- :useEnvVarOnly
- if "%JAVA_HOME%" == "" goto JavaHomeError
- set J_HOME=%JAVA_HOME%
- echo Looking for JRE in: %J_HOME%\bin...
- if exist "%J_HOME%\bin\java.exe" goto gotJava
- set J_HOME=%JAVA_HOME%\jre
- echo Looking for JRE in: %J_HOME%\jre\bin...
- if exist "%J_HOME%\bin\java.exe" goto gotJava
- :JavaHomeError
- echo You have specified the argument '-java:env'.
- echo However, the environment variable JAVA_HOME is not defined or incorrectly defined.
- echo Please define JAVA_HOME first before using the argument '-java:env'.
- goto finish
- goto error
- :useEnvVar
- if "%1" == "-java:env" (shift & echo Option -java:env is not supported. Ignore it.)
- if "%JAVA_HOME%" == "" (
- set J_HOME=.
- ) else (
- set J_HOME=%JAVA_HOME%
- )
- echo Looking for JRE in: %J_HOME%\bin...
- if exist "%J_HOME%\bin\java.exe" goto gotJava
- if "%JAVA_HOME%" == "" (
- set J_HOME=..\ibm-jre\jre
- ) else (
- set J_HOME=%JAVA_HOME%\jre
- )
- echo Looking for JRE in: %J_HOME%\bin...
- if exist "%J_HOME%\bin\java.exe" goto gotJava
- :error
- echo Could not find a JRE. Cannot run IBM Cognos Configuration.
- goto finish
- :gotJava
- set _RUNJAVA="%J_HOME%\bin\java"
- set J_OPTS="-Dcom.ibm.jsse2.overrideDefaultTLS=true" %J_OPTS%
- if "%1" == "-ipv4" (shift & goto configureIPv4)
- if "%1" == "-IPv4" (shift & goto configureIPv4)
- if "%1" == "-ipv6" (shift & goto configureIPv6)
- if "%1" == "-IPv6" (shift & goto configureIPv6)
- goto ddraw
- :configureIPv4
- set J_OPTS="-Djava.net.preferIPv4Stack=true" %J_OPTS%
- goto ddraw
-
- :configureIPv6
- set J_OPTS="-Djava.net.preferIPv6Addresses=true" %J_OPTS%
- goto ddraw
- :ddraw
- if "%1" == "-noddraw" set DD_OPTS=-Dsun.java2d.noddraw=true
- if "%1" == "-noDDraw" set DD_OPTS=-Dsun.java2d.noddraw=true
- if not "%DD_OPTS%" == "" echo Disabling DirectDraw...
- set J_OPTS=%DD_OPTS% %J_OPTS% %DEBUG_OPTS%
- set CP=.;..\bin\cclcfgmcf_mcf.jar;cogconfig.jar;configcnfm.jar;..\bin\cogconfigi.jar;..\bin\cogcnfm.jar;..\bin\bcprov.jar;..\bin\bcpkix.jar;..\bin\dom4j-2.1.1.jar;..\bin\jaxen-1.1.1.jar;..\bin\cclcfgmcf.jar;..\bin\cclcfgapi.jar;..\bin\jcam_crypto.jar;..\bin\i18nj.jar;..\bin\icu4j.jar;..\bin\commons-httpclient-3.1.jar;..\bin\commons-codec-1.15.jar;..\bin\commons-logging-1.1.jar;..\bin\commons-logging-api-1.1.jar;..\bin\commons-logging-adapters-1.1.jar;..\bin\CognosIPF.jar;..\bin\slf4j-nop-1.7.23.jar;..\bin\log4j-api-2.17.1.jar;..\bin\log4j-core-2.17.1.jar;..\bin\log4j-over-slf4j-1.7.35.jar;..\bin\jcam_jni.jar;..\bin\jdxslt.jar;..\bin\jcam_config_test.jar;..\bin\cclcoreutil.jar;..\bin\CognosCCL4J.jar;..\configuration\utilities\config-util.jar
- @echo Using CLASSPATH: %CP%
- @echo Using J_HOME: %J_HOME%
- @echo Using J_OPTS: %J_OPTS%
- %_RUNJAVA% -cp %CP% %J_OPTS% CRConfig %1 %2 %3 %4 %5 %6 %7 %8 %9
- exit /b %ERRORLEVEL%
- :finish
- endlocal
- exit /b 2
|