ThirdPartyCertificateTool.bat 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. @rem
  2. @rem Licensed Materials - Property of IBM
  3. @rem
  4. @rem IBM Cognos Products: CAMCrypto
  5. @rem
  6. @rem (C) Copyright IBM Corp. 2005, 2022
  7. @rem
  8. @rem US Government Users Restricted Rights - Use,
  9. @rem duplication or disclosure restricted by GSA
  10. @rem ADP Schedule Contract with IBM Corp.
  11. @rem
  12. @echo off
  13. rem ---------------------------------------------------------------------------
  14. rem Shell script (Windows) to invoke jre and launch 3rd party certificate tool
  15. rem
  16. rem J_HOME is the location of the Java RE installation; if JAVA_HOME is
  17. rem defined, use it. Otherwise default to the relative distribution.
  18. rem J_OPTS are the Java options to be passed into the JAVA VM (optional)
  19. rem
  20. rem ---------------------------------------------------------------------------
  21. SETLOCAL
  22. rem ----- Verify Required Environment Variables -----------------------
  23. set FULLPARAMS=%*
  24. rem using the local distribution
  25. rem Shift the first argument: -java:local
  26. if "%1" == "-java:local" goto useLocal
  27. set J_HOME=%JAVA_HOME%
  28. echo Looking in: %J_HOME%\bin...
  29. if exist "%J_HOME%\bin\java.exe" goto gotJava
  30. set J_HOME=%JAVA_HOME%\jre
  31. echo Looking in: %J_HOME%\bin...
  32. if exist "%J_HOME%\bin\java.exe" goto gotJava
  33. set J_HOME=..\ibm-jre\jre
  34. echo Looking in: %J_HOME%\bin...
  35. if exist "%J_HOME%\bin\java.exe" goto gotJava
  36. echo Error could not find a JRE.
  37. goto done
  38. :uselocal
  39. REM remove -java:local from parameter list
  40. set FULLPARAMS=%FULLPARAMS:~12%
  41. set J_HOME=..\ibm-jre\jre
  42. echo Looking in: %J_HOME%\bin...
  43. if exist "%J_HOME%\bin\java.exe" goto gotJava
  44. echo Error could not find a JRE.
  45. goto done
  46. :gotJava
  47. rem ----- Execute The Requested Command ---------------------------------------
  48. echo Executing:
  49. echo %J_HOME%\bin\java.exe %J_OPTS% -jar ThirdPartyCertificateTool.jar %FULLPARAMS%
  50. "%J_HOME%\bin\java.exe" %J_OPTS% %CAMCRYPTO_OPTS% -Dorg.slf4j.simpleLogger.defaultLogLevel=ERROR -jar ThirdPartyCertificateTool.jar %FULLPARAMS%
  51. :done