Difference between revisions of "Java"

From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search
(JDK UnInstall string update)
Line 7: Line 7:
  
 
For the JDK, just change "jre" to "jdk" in the setup program's name and change "A77B" to "A78A" in the Uninstall ID.
 
For the JDK, just change "jre" to "jdk" in the setup program's name and change "A77B" to "A78A" in the Uninstall ID.
 +
 +
For the JDK, we had to replace {3248F0A8-6813-11D6-A77B- with '''{32A3A4F4-B792-11D6-A78A-'''. This works and tested with Java6u7
  
 
<source lang="xml">
 
<source lang="xml">

Revision as of 07:46, 15 October 2008

Java Runtime Environment (JRE) 6 Update 7

You are encouraged to upgrade for security reasons to Update 7: http://secunia.com/advisories/31010/.

This requires the Windows Offline installation package available from Sun. Note that the java install package does not replace old versions, so JRE 1.5 and JRE 1.6 can coexist; all older 1.6 update versions (1.6.0 up to 1.6.0 Update 6) are tried to be removed (note that the update version is reflected in the last number in the Uninstall ID). Notice how the path string in the uninstall check has changed from previous version.

For the JDK, just change "jre" to "jdk" in the setup program's name and change "A77B" to "A78A" in the Uninstall ID.

For the JDK, we had to replace {3248F0A8-6813-11D6-A77B- with {32A3A4F4-B792-11D6-A78A-. This works and tested with Java6u7

 <package id="java6" name="Java Runtime Environment 6 Update 7" revision="7" reboot="false" priority="100">
  <check type="uninstall" condition="exists" path="Java(TM) 6 Update 7" />
  <install cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0160000}'><exit code='0' /><exit code='1605' /></install>
  <install cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0160010}'><exit code='0' /><exit code='1605' /></install>
  <install cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0160020}'><exit code='0' /><exit code='1605' /></install>
  <install cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0160030}'><exit code='0' /><exit code='1605' /></install>
  <install cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0160040}'><exit code='0' /><exit code='1605' /></install>
  <install cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0160050}'><exit code='0' /><exit code='1605' /></install>
  <install cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0160060}'><exit code='0' /><exit code='1605' /></install>
  <install cmd='%SOFTWARE%\jre\jre-6u7-windows-i586-p.exe /s IEXPLORER=1 MOZILLA=1 ADDLOCAL=ALL REBOOT=Suppress JAVAUPDATE=0 JU=0 AUTOUPDATECHECK=0' />
  <upgrade cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0160000}'><exit code='0' /><exit code='1605' /></upgrade>
  <upgrade cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0160010}'><exit code='0' /><exit code='1605' /></upgrade>
  <upgrade cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0160020}'><exit code='0' /><exit code='1605' /></upgrade>
  <upgrade cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0160030}'><exit code='0' /><exit code='1605' /></upgrade>
  <upgrade cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0160040}'><exit code='0' /><exit code='1605' /></upgrade>
  <upgrade cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0160050}'><exit code='0' /><exit code='1605' /></upgrade>
  <upgrade cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0160060}'><exit code='0' /><exit code='1605' /></upgrade>
  <upgrade cmd='%SOFTWARE%\jre\jre-6u7-windows-i586-p.exe /s IEXPLORER=1 MOZILLA=1 ADDLOCAL=ALL REBOOT=Suppress JAVAUPDATE=0 JU=0 AUTOUPDATECHECK=0' />
  <remove cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0160070}' />
 </package>

Automatic updates can be disabled with JAVAUPDATE=0 JU=0 AUTOUPDATECHECK=0; if these command line switches should not work for you, then you can alter the registry (read Adding Registry Settings for that) to disable autoupdate:

[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Update\Policy]
"EnableAutoUpdateCheck"=dword:00000000
"EnableJavaUpdate"=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
"SunJavaUpdateSched"=-


J2SE Runtime Environment 5.0 Update 11

This requires the Windows Offfline installation package available from Sun. Note that the java install package does not replace old versions, so to accomplish a true upgrade, remove commands are required for the install/upgrade process.

<package id="java" name="Java Runtime Environment 1.5.0_11" revision="4" reboot="false" priority="0">
  <check type="uninstall" condition="exists" path="J2SE Runtime Environment 5.0 Update 11" />
  <install cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150000}'><exit code='0' /><exit code='1605' /></install>
  <install cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150010}'><exit code='0' /><exit code='1605' /></install>
  <install cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150020}'><exit code='0' /><exit code='1605' /></install>
  <install cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150030}'><exit code='0' /><exit code='1605' /></install>
  <install cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150040}'><exit code='0' /><exit code='1605' /></install>
  <install cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150050}'><exit code='0' /><exit code='1605' /></install>
  <install cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150060}'><exit code='0' /><exit code='1605' /></install>
  <install cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150070}'><exit code='0' /><exit code='1605' /></install>
  <install cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150080}'><exit code='0' /><exit code='1605' /></install>
  <install cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150090}'><exit code='0' /><exit code='1605' /></install>
  <install cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150100}'><exit code='0' /><exit code='1605' /></install>
  <install cmd='%SOFTWARE%\jre\jre-1_5_0_11-windows-i586-p-s.exe /s /v" /qn IEXPLORER=1 MOZILLA=1 ADDLOCAL=ALL REBOOT=Supress JAVAUPDATE=0' />
  <upgrade cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150000}'><exit code='0' /><exit code='1605' /></upgrade>
  <upgrade cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150010}'><exit code='0' /><exit code='1605' /></upgrade>
  <upgrade cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150020}'><exit code='0' /><exit code='1605' /></upgrade>
  <upgrade cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150030}'><exit code='0' /><exit code='1605' /></upgrade>
  <upgrade cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150040}'><exit code='0' /><exit code='1605' /></upgrade>
  <upgrade cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150050}'><exit code='0' /><exit code='1605' /></upgrade>
  <upgrade cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150060}'><exit code='0' /><exit code='1605' /></upgrade>
  <upgrade cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150070}'><exit code='0' /><exit code='1605' /></upgrade>
  <upgrade cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150080}'><exit code='0' /><exit code='1605' /></upgrade>
  <upgrade cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150090}'><exit code='0' /><exit code='1605' /></upgrade>
  <upgrade cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150100}'><exit code='0' /><exit code='1605' /></upgrade>
  <upgrade cmd='%SOFTWARE%\jre\jre-1_5_0_11-windows-i586-p-s.exe /s /v" /qn IEXPLORER=1 MOZILLA=1 ADDLOCAL=ALL REBOOT=Supress JAVAUPDATE=0' />
  <remove cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150110}' />
</package>

J2SE Runtime Environment 5.0 Update 10

This requires the Windows Offfline installation package available from Sun. Note that the java install package does not replace old versions, so to accomplish a true upgrade, remove commands are required for the install/upgrade process.

Note that the class id of the remove section was incorrect in an early edition of this page - the last 3 digits should be 100, not 010.

<package id="java" name="Java Runtime Environment 1.5.0_10" revision="3" reboot="false" priority="0">
  <check type="uninstall" condition="exists" path="J2SE Runtime Environment 5.0 Update 10" />
  <install cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150000}'><exit code='0' /><exit code='1605' /></install>
  <install cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150010}'><exit code='0' /><exit code='1605' /></install>
  <install cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150020}'><exit code='0' /><exit code='1605' /></install>
  <install cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150030}'><exit code='0' /><exit code='1605' /></install>
  <install cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150040}'><exit code='0' /><exit code='1605' /></install>
  <install cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150050}'><exit code='0' /><exit code='1605' /></install>
  <install cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150060}'><exit code='0' /><exit code='1605' /></install>
  <install cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150070}'><exit code='0' /><exit code='1605' /></install>
  <install cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150080}'><exit code='0' /><exit code='1605' /></install>
  <install cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150090}'><exit code='0' /><exit code='1605' /></install>
  <install cmd='%SOFTWARE%\jre\jre-1_5_0_10-windows-i586-p-s.exe /s /v" /qn IEXPLORER=1 MOZILLA=1 ADDLOCAL=ALL REBOOT=Supress JAVAUPDATE=0' />
  <upgrade cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150000}'><exit code='0' /><exit code='1605' /></upgrade>
  <upgrade cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150010}'><exit code='0' /><exit code='1605' /></upgrade>
  <upgrade cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150020}'><exit code='0' /><exit code='1605' /></upgrade>
  <upgrade cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150030}'><exit code='0' /><exit code='1605' /></upgrade>
  <upgrade cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150040}'><exit code='0' /><exit code='1605' /></upgrade>
  <upgrade cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150050}'><exit code='0' /><exit code='1605' /></upgrade>
  <upgrade cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150060}'><exit code='0' /><exit code='1605' /></upgrade>
  <upgrade cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150070}'><exit code='0' /><exit code='1605' /></upgrade>
  <upgrade cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150080}'><exit code='0' /><exit code='1605' /></upgrade>
  <upgrade cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150090}'><exit code='0' /><exit code='1605' /></upgrade>
  <upgrade cmd='%SOFTWARE%\jre\jre-1_5_0_10-windows-i586-p-s.exe /s /v" /qn IEXPLORER=1 MOZILLA=1 ADDLOCAL=ALL REBOOT=Supress JAVAUPDATE=0' />
  <remove cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150100}' />
</package>

J2SE Runtime Environment 5.0 Update 9

This requires the Windows Offfline installation package available from Sun. Note that the java install package does not replace old versions, so to accomplish a true upgrade, remove commands are required for the install/upgrade process.


<package id="jre" name="Java Runtime Environment 1.5.0_9" revision="2" reboot="false" priority="0">
  <check type="uninstall" condition="exists" path="J2SE Runtime Environment 5.0 Update 9" />
  <install cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150000}'><exit code='0' /><exit code='1605' /></install>
  <install cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150010}'><exit code='0' /><exit code='1605' /></install>
  <install cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150020}'><exit code='0' /><exit code='1605' /></install>
  <install cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150030}'><exit code='0' /><exit code='1605' /></install>
  <install cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150040}'><exit code='0' /><exit code='1605' /></install>
  <install cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150050}'><exit code='0' /><exit code='1605' /></install>
  <install cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150060}'><exit code='0' /><exit code='1605' /></install>
  <install cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150070}'><exit code='0' /><exit code='1605' /></install>
  <install cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150080}'><exit code='0' /><exit code='1605' /></install>
  <install cmd='%SOFTWARE%\java\jre-1_5_0_09-windows-i586-p.exe /s /v" /qn IEXPLORER=1 MOZILLA=1 ADDLOCAL=ALL REBOOT=Supress JAVAUPDATE=0' />
  <upgrade cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150000}'><exit code='0' /><exit code='1605' /></upgrade>
  <upgrade cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150010}'><exit code='0' /><exit code='1605' /></upgrade>
  <upgrade cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150020}'><exit code='0' /><exit code='1605' /></upgrade>
  <upgrade cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150030}'><exit code='0' /><exit code='1605' /></upgrade>
  <upgrade cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150040}'><exit code='0' /><exit code='1605' /></upgrade>
  <upgrade cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150050}'><exit code='0' /><exit code='1605' /></upgrade>
  <upgrade cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150060}'><exit code='0' /><exit code='1605' /></upgrade>
  <upgrade cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150070}'><exit code='0' /><exit code='1605' /></upgrade>
  <upgrade cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150080}'><exit code='0' /><exit code='1605' /></upgrade>
  <upgrade cmd='%SOFTWARE%\java\jre-1_5_0_09-windows-i586-p.exe /s /v" /qn IEXPLORER=1 MOZILLA=1 ADDLOCAL=ALL REBOOT=Supress JAVAUPDATE=0' />
  <remove cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150090}' />
</package>

J2SE Runtime Environment 5.0 Update 6

This requires the Windows Offline installation package available from Sun.

<package id="jre" name="Java Runtime Environment 1.5.0_6" revision="1" reboot="true" priority="0">
 <check type="uninstall" condition="exists" path="J2SE Runtime Environment 5.0 Update 6" />
 <install cmd='%WINDIR%\system32\cmd /c start /wait /d %SOFTWARE%\java %SOFTWARE%\java\jre-1_5_0_06-windows-i586-p.exe /s /v" /qn IEXPLORER=1 MOZILLA=1 ADDLOCAL=ALL REBOOT=Supress JAVAUPDATE=0' />
 <remove cmd='msiexec /qn /x {3248F0A8-6813-11D6-A77B-00B0D0150060}' />
</package>

Other Useful MSI Properties

This will install java with no updating and no icons:

jre-1_5_0_10-windows-i586-p-s.exe /s /v"/qn ADDLOCAL=ALL AUTOUPDATECHECK=0 JU=0 IEXPLORER=1 MOZILLA=1 WEBSTARTICON=0 SYSTRAY=0 REBOOT=Suppress JAVAUPDATE=0 EULA=1"

Further Details

J2SE Runtime Environment 5.0 Update 5

First download the EXE package from java.sun.com, install it, and find an MSI package on your drive. Then use this MSI to distribute Java to other machines.

Note: When you use the *.exe file directly with command line switches as proposed by sun the installer waits forever for someone accepting the licence agreement.

Note that "install cmd" should be in one line; it was wrapped because it was too long to fit here!

 <package
     id="jre"
     name="Java Runtime Environment 1.5.0_05"
     revision="1"
     reboot="true"
     priority="9">
     <check type="uninstall" condition="exists" path="J2SE Runtime Environment 5.0 Update 5" />
     <install cmd='msiexec /q /i %SOFTWARE%\Java\jre1.5.0_05.msi allusers=1 REBOOT=Suppress CUSTOM=1 IEXPLORER=1 MOZILLA=1 NETSCAPE6=1 JAVAUPDATE=0 ADDLOCAL=ALL' />
     <remove  cmd='MsiExec.exe /q /x{3248F0A8-6813-11D6-A77B-00B0D0150050}' />
 </package>

 <package
     id="jdk"
     name="Java Development Kit 1.5.0_05"
     revision="1"
     reboot="true"
     priority="9">
     <check type="uninstall" condition="exists" path="J2SE Development Kit 5.0 Update 5" />
     <install cmd='msiexec /q /i %SOFTWARE%\Java\jdk1.5.0_05.msi allusers=1 REBOOT=Suppress CUSTOM=1 IEXPLORER=1 MOZILLA=1 NETSCAPE6=1 JAVAUPDATE=0 ADDLOCAL=ALL' />
     <remove  cmd='MsiExec.exe /q /x{32A3A4F4-B792-11D6-A78A-00B0D0150050}' />
 </package>

See also Sun Java