@echo off REM Command to set up Java Web Start Explorer JAR REM Edit these environment variables REM -------------------------------- set java=c:\Program Files\IBM\Java70\ set days=365 set keystore="explorerstore" set keyalias="exploreralias" REM Start :createcert @echo ======================================================================= @echo Step 1. Create a certificate for signing the jars in the keystore @echo "explorerstore". If you have your own keystore and certificate @echo already, modify the script to point to it. If you create it @echo using this line, you'll be prompted for details about your @echo organization, and a password. @echo "%java%\bin\keytool" -genkey -alias %keyalias% -keystore %keystore% -validity %days% "%java%\bin\keytool" -genkey -alias %keyalias% -keystore %keystore% -validity %days% :sign @echo ======================================================================= @echo Step 2. Sign the explorer_webstart jar with the certificate. This file @echo will be hosted on the web server. @echo "%java%\bin\jarsigner" -keystore %keystore% explorer_webstart.jar %keyalias% "%java%\bin\jarsigner" -keystore %keystore% explorer_webstart.jar %keyalias% @echo verify explorer_webstart signature @echo "%java%\bin\jarsigner" -verify explorer_webstart.jar "%java%\bin\jarsigner" -verify explorer_webstart.jar @echo ======================================================================= @echo Step 3. Remove the JRE from CICS_Explorer - saves download time because @echo when using Java Web Start, Explorer will run using the JRE on @echo the client workstation. rmdir CICS_Explorer\jre /S /Q @echo ======================================================================= @echo Step 4. Create an explorer.jar - this will be unzipped on the client @echo workstation, and held within the signed jar. @echo "%java%\bin\jar" -cf explorer.jar CICS_Explorer "%java%\bin\jar" -cf explorer.jar CICS_Explorer @echo ======================================================================= @echo Step 5. Create the explorer_container.win32.x86.jar which will be @echo hosted on the web server The jar manifest much contain @echo "all-permissions" to match the permissions required in the JNLP file. @echo "%java%\bin\jar" -xf explorer_webstart.jar manifest.line "%java%\bin\jar" -xf explorer_webstart.jar manifest.line @echo "%java%\bin\jar" -cmf manifest.line explorer_container.win32.x86.jar explorer.jar "%java%\bin\jar" -cmf manifest.line explorer_container.win32.x86.jar explorer.jar @echo ======================================================================= @echo Step 6. Sign the explorer jar @echo "%java%\bin\jarsigner" -keystore %keystore% explorer_container.win32.x86.jar %keyalias% "%java%\bin\jarsigner" -keystore %keystore% explorer_container.win32.x86.jar %keyalias% @echo Verify explorer_container.win32.x86 signature @echo "%java%\bin\jarsigner" -verify explorer_container.win32.x86.jar "%java%\bin\jarsigner" -verify explorer_container.win32.x86.jar @echo ======================================================================= @echo Step 7. Clean-up files that were created temporarily del explorer.jar del manifest.line