Changes

Java

238 bytes added, 18:11, 3 December 2008
no edit summary
==Java 6 (JRE/SDK), generic solution==
This is my personal solution. Works properly for me starting from Java 6 Update 1011.
It works on Windows XP and Vista. 64-bit OS is supported as well as 32-bit OS.
It also seems that Sun is not going to install each Java update into an independent directory. Well, Update 11 is not out yet, but when I look to the new install directory structure one might think that upcoming updates will overwrite the files. This will hopefully eliminate the need to uninstall previous versions manually.
===Download===
First of all download the offline installers. Do not download the new Online installers. It might work as well but I did not try it.
After download you should have the following files (or a subset of it):
* jdk-6u106u11-windows-i586-p.exe* jdk-6u106u11-windows-x64.exe* jre-6u106u11-windows-i586-p.exe* jre-6u106u11-windows-x64.exe
If you just deploy JRE, then you do not need to download the JDK packages. Similarly you do not need the x64 packages if you deploy to 32-bit OS only.
# Get the extracted installer from "%AppData%\Sun\Java\" ("%LocalAppData%\..\LocalLow\Sun\Java" in Vista) and copy them to the package deployment folder. Do this for all packages you like to deploy. Here's a sample how my directory structure looks after extracting and copying:
#* JavaSE/install.cmd
#* JavaSE/jdk1.6.0_10_320_11_32/jdk-6u106u11-windows-i586-p.exe#* JavaSE/jdk1.6.0_10_320_11_32/jdk1.6.0_100_11.msi#* JavaSE/jdk1.6.0_10_320_11_32/sb160100sb160110.cab#* JavaSE/jdk1.6.0_10_320_11_32/sd160100sd160110.cab#* JavaSE/jdk1.6.0_10_320_11_32/sj160100sj160110.cab#* JavaSE/jdk1.6.0_10_320_11_32/sp160100sp160110.cab#* JavaSE/jdk1.6.0_10_320_11_32/sr160100sr160110.cab#* JavaSE/jdk1.6.0_10_320_11_32/ss160100ss160110.cab#* JavaSE/jdk1.6.0_10_320_11_32/st160100st160110.cab#* JavaSE/jdk1.6.0_10_320_11_32/sz160100sz160110.cab#* JavaSE/jdk1.6.0_10_x640_11_x64/jdk-6u106u11-windows-x64.exe#* JavaSE/jdk1.6.0_10_x640_11_x64/jdk-6u106u11-windows-x64.msi#** Note: This installer seems to be different from all the others. It uses a different package format and extracts to "%TEMP%\<UID>". So you have to grab the MSI file from there.#* JavaSE/jre1.6.0_10_320_11_32/Data1.cab#* JavaSE/jre1.6.0_10_320_11_32/jre-6u106u11-windows-i586-p.exe#* JavaSE/jre1.6.0_10_320_11_32/jre1.6.0_100_11.msi#* JavaSE/jre1.6.0_10_x640_11_x64/Data1.cab#* JavaSE/jre1.6.0_10_x640_11_x64/jre-6u106u11-windows-x64.exe#* JavaSE/jre1.6.0_10_x640_11_x64/jre.msi#** Note: I had to rename the msi file from "jre1.6.0_10.msi" to "jre.msi" in order to install properly. Without this fix it failed with a message that it could not locate "jre.msi". Seems to be a bug within the msi package.
#* JavaSE/unattended-jdk-uninstall.cmd
#* JavaSE/unattended-jdk.cmd
<!-- Java runtime environment -->
<check type='logical' condition='or'>
<check type='uninstall' condition='exists' path='Java(TM) 6 Update 1011' /> <check type='uninstall' condition='exists' path='Java(TM) 6 Update 10 11 (64-bit)' />
</check>
<install cmd='"%SOFTWARE%\JavaSE\unattended-jre.cmd"' />
REM the %LocalAppData%\..\LocalLow\Sun\Java folder
set PKG32=jre1.6.0_10_320_11_32\jre1.6.0_100_11.msiset PKG64=jre1.6.0_10_x640_11_x64\jre1.6.0_10jre.msi
set EXIT_CODE=0
REM the %LocalAppData%\..\LocalLow\Sun\Java folder
set PKG32=jdk1.6.0_10_32\jdk1.6.0_100_11.msiset PKG64=jdk1.6.0_10_x64\jdk-6u106u11-windows-x64.msi
set EXIT_CODE=0
Anonymous user