Changes

Jump to: navigation, search

Java

2,942 bytes removed, 01:04, 17 February 2011
Update to JRE 6 Update 24, and lots of clean up. Still needs work.
Despite the page title, this page is for the Java 2 Standard Edition Runtime Environment, rather than the full-blown Java or Java Software Developer Kit / SDK. This is more commonly known as the Java Runtime Environment or JRE. The JRE provides an ability for programs written in the Java programming language to be launched from a web page and run in a web browser.There are many variations on Sun's (now Oracle's) JRE, in particular this page is for the Oracle Java Runtime Environment, previously known as the Sun Java Runtime Environment.
For security reasons you are encouraged to upgrade to the latest release. Bug Fixes of the Update Release Notes under each release: http://java.sun.com/javase/6/webnotes/ReleaseNotes.html. However, if you're running JRE 6 Update 10 or onwards and haven't disabled automatic updates then JRE should automatically be downloading and installing updates.
For security reasons you are encouraged to upgrade to the latest release.Bug Fixes of the Update Release Notes under each release: http://java.sun.com/javase/6/webnotes/ReleaseNotes.html.However, if you're running ==Java Runtime Environment (JRE ) 6 Update 10 or onwards and haven't disabled automatic updates then JRE should automatically be downloading and installing updates.==
 ==Java Runtime Environment (JRE) 6 Update 23=Installer Versions===
There are various versions of the installer:
* Those from a http://java.sun.com/javase/downloads/index.jsp which are aimed at developers or ISVs. We want the 'Windows Offline Installation' version with a filename of jre-6u236u##-windows-i586.exe. Also available here are 'Windows Online Installation' (jre-6u23-windows-i586-iftw-rv.exe) and 'Windows Kernel Installation' (jre-6u23-windows-i586-iftw-k.exe).
* Those from http://www.java.com/en/download/manual.jsp which are aimed at consumers. The versions available here are 'Windows 7/XP/Vista/2000/2003/2008 Online' (same as the 'Windows Online Installation' above) (jre-6u23-windows-i586-iftw-rv.exe) and 'Windows 7/XP/Vista/2000/2003/2008 Offline' (not the same as the 'Windows Offline Installation' above) (jre-6u23-windows-i586-s.exe). In versions prior to update 19 or maybe 18 the installer filename ending in -s.exe tried to download the Google Toolbar so this may still be the case with this version.
"Java Quick Starter" is described as a prefetching service that should make java applications start faster. But it has a drawback: it must be killed before uninstallation or installation fails, and uninstallation via msiexec does not seem to be smart enough to do this.===Uninstalling Old Versions===
----====Update====This is Older versions of Java did not uninstall themselves when new versions were installed. These older versions can pose a problem though, simply insert the following snippet into security risk even with newer versions installed. Older versions should be uninstalled unless they are required for some reason. Attempting to uninstall every old version of Java in the package definition can be very first of slow. Only include these uninstall commands in your install AND upgrade commands of the xml from package definition if there is a possibility that clients will have the next paragrapholder Java versions.
<install cmd='net STOP JavaQuickStarterService' > <exit code='2' /> </install> This will stop the java quickThe patch-start service prior to installation or upgrade. In case it was already stopped (Errorlevel 2) the error is simply ignored.Remove the commands (%PROGRAMFILES%\Java\jre6\bin\jqs.exe -unregister') that disable the 'Java Quick Starter' from your xml to take advantage of it.---- Although there seems to be no command line switches to allow/disallow the installation of "Java Quick Starter", the jqs.exe binary itself can be used immediately after installation in order to add/remove the "Java Quick Starter" service. The following table shows the command line switches you can invoke with the jqs.exe binary:  C:\Program Files\Java\jre6\bin>jqs -help Usage: jqs <mode> [<options>] The following modes are supported: -help print this help message and exit -register install JQS service and register browser startup detectors -unregister uninstall JQS service and unregister startup detectors -enable enable JQS service -disable disable JQS service -pause pause prefetching -resume resume prefetching -version print version of the associated Java Runtime Options include: -config <config> set JQS configuration file -profile <profile> set JQS profile file -logfile <logfile> set JQS log file -verbose <level> verbose operation  This requires the Windows Offline installation package available from Sun. Note that a particular Java family install package does not remove already installed versions of another Java family, so JRE 1.5 and JRE 1.6 can coexist; all older 1.6 update versions (1.6.0 up to but not including the most recent version) are uninstalled by the following packaging (note that the update version seems to be no more reflected in the last number in the Uninstall ID). Actually, with Update 10 and later Sun has place mechanism was introduced as default the so called "patch in place" update mechanism (see: http://java.sun.com/javase/JRE 6/docs/technotes/guides/jweb/otherFeatures/jre_install.html) which automatically removes the previous version of the same Java family (unless you turned off patch-in-place using the installer). So the line that tries to remove a previously installed Update 10 (msiexec /qn /x {26A24AE4-039D-4CA4-87B4-2F83216010FF}) is not strictly necessary (if you installed a 'Family JRE' and not a 'Static JRE'). Patch-in-place sometimes fails with "Error 25099. Unzipping core files failed", returning error code 1603 from msiexec. Sometimes installation will succeed on a later reboot without any intervention, but sometimes it continues to fail. As of December 2010, the root cause is not known, but Sun/Oracle suggests (at http://www.java.com/en/download/help/error_25099.xml) removing %PROGRAMFILES%\Java\jre6 so only versions before retrying installation. A fully-automatic workaround requires the ability to execute commands in response to particular error codes and thus may that need to take the form of a batch program wrapped around msiexec. ==== JRE without Java Quick Starter on 32-bit hosts ====The following installs JRE Update 23 and then removes the "Java Quick Starter" service; if you want to keep "Java Quick Starter" service then just remove the line with "jqs.exe -unregister", but remeber to stop/kill JQS before uninstallationbe uninstalled.
<source lang="xml">
<package id="java6" name="Java Runtime Environment 6 Update 23" revision="23" reboot="false" priority="100">
<check type="uninstall" condition="exists" path="Java(TM) 6 Update 23" />
<!-- Cleaning old java versions-->
<install cmd='msiexec /qn /norestart /x {7148F0A8-6813-11D6-A77B-00B0D0142000}'><exit code='0' /><exit code='1605' /></install>
<install cmd='msiexec /qn /norestart /x {7148F0A8-6813-11D6-A77B-00B0D0142010}'><exit code='0' /><exit code='1605' /></install>
<install cmd='msiexec /qn /norestart /x {3248F0A8-6813-11D6-A77B-00B0D0160060}'><exit code='0' /><exit code='1605' /></install>
<install cmd='msiexec /qn /norestart /x {3248F0A8-6813-11D6-A77B-00B0D0160070}'><exit code='0' /><exit code='1605' /></install>
<install cmd='msiexec /qn /norestart /x {26A24AE4-039D-4CA4-87B4-2F83216010FF}'><exit code='0' /><exit code='1605' /></install> <install cmd='msiexec /qn /norestart /x {26A24AE4-039D-4CA4-87B4-2F83216011FF}'><exit code='0' /><exit code='1605' /></install> <install cmd='msiexec /qn /norestart /x {26A24AE4-039D-4CA4-87B4-2F83216012FF}'><exit code='0' /><exit code='1605' /></install> <install cmd='msiexec /qn /norestart /x {26A24AE4-039D-4CA4-87B4-2F83216013FF}'><exit code='0' /><exit code='1605' /></install> <install cmd='msiexec /qn /norestart /x {26A24AE4-039D-4CA4-87B4-2F83216014FF}'><exit code='0' /><exit code='1605' /></install> <install cmd='msiexec /qn /norestart /x {26A24AE4-039D-4CA4-87B4-2F83216015FF}'><exit code='0' /><exit code='1605' /></install> <install cmd='msiexec /qn /norestart /x {26A24AE4-039D-4CA4-87B4-2F83216016FF}'><exit code='0' /><exit code='1605' /></install> <install cmd='msiexec /qn /norestart /x {26A24AE4-039D-4CA4-87B4-2F83216017FF}'><exit code='0' /><exit code='1605' /></install> <install cmd='msiexec /qn /norestart /x {26A24AE4-039D-4CA4-87B4-2F83216018FF}'><exit code='0' /><exit code='1605' /></install> <install cmd='msiexec /qn /norestart /x {26A24AE4-039D-4CA4-87B4-2F83216019FF}'><exit code='0' /><exit code='1605' /></install> <install cmd='msiexec /qn /norestart /x {26A24AE4-039D-4CA4-87B4-2F83216020FF}'><exit code='0' /><exit code='1605' /></install> <install cmd='msiexec /qn /norestart /x {26A24AE4-039D-4CA4-87B4-2F83216021FF}'><exit code='0' /><exit code='1605' /></install> <install cmd='msiexec /qn /norestart /x {26A24AE4-039D-4CA4-87B4-2F83216022FF}'><exit code='0' /><exit code='1605' /></install> <install cmd='taskkill /f /im jqs.exe /im iexplore.exe /im firefox.exe'><exit code='0' /><exit code='1' /><exit code='128' /></install> <install cmd='%SOFTWARE%\jre\jre-6u23-windows-i586.exe /s IEXPLORER=1 MOZILLA=1 ADDLOCAL=ALL REBOOT=Suppress JAVAUPDATE=0 JU=0 AUTOUPDATECHECK=0' /> <install cmd='%COMSPEC% /C if exist "%PROGRAMFILES%\Java\jre6\bin\jqs.exe" "%PROGRAMFILES%\Java\jre6\bin\jqs.exe" -unregister'> <exit code='1' /> </install> <install cmd='%COMSPEC% /C if exist "%PROGRAMFILES(x86)%\Java\jre6\bin\jqs.exe" "%PROGRAMFILES(x86)%\Java\jre6\bin\jqs.exe" -unregister'> <exit code='1' /> </install>
<upgrade cmd='msiexec /qn /norestart /x {7148F0A8-6813-11D6-A77B-00B0D0142000}'><exit code='0' /><exit code='1605' /></upgrade>
<upgrade cmd='msiexec /qn /norestart /x {7148F0A8-6813-11D6-A77B-00B0D0142010}'><exit code='0' /><exit code='1605' /></upgrade>
<upgrade cmd='msiexec /qn /norestart /x {3248F0A8-6813-11D6-A77B-00B0D0160060}'><exit code='0' /><exit code='1605' /></upgrade>
<upgrade cmd='msiexec /qn /norestart /x {3248F0A8-6813-11D6-A77B-00B0D0160070}'><exit code='0' /><exit code='1605' /></upgrade>
</source> ===Java Quick Starter=== "Java Quick Starter" is described as a prefetching service that should make java applications start faster. But it has a drawback: it must be killed before uninstallation or installation fails, and uninstallation via msiexec does not seem to be smart enough to do this. This is not a problem though, simply insert the following snippet into the very first of your install AND upgrade cmdcommands of the xml from the next paragraph. <source lang='msiexec /qn /norestart /x {26A24AE4-039D-4CA4-87B4-2F83216010FF}'"xml"><exit codeinstall cmd='0net STOP JavaQuickStarterService' /> <exit code='16052' /></upgradeinstall> <upgrade cmd='msiexec /qn /norestart /x {26A24AE4source> This will stop the java quick-039Dstart service prior to installation or upgrade. In case it was already stopped (Errorlevel 2) the error is simply ignored. If you want to use it, be sure to remove the commands (%PROGRAMFILES%\Java\jre6\bin\jqs.exe -4CA4-87B4-2F83216011FF}unregister'><exit code=) that disable the '0Java Quick Starter' from your package definition. Although there seems to be no command line switches to allow/disallow the installation of "Java Quick Starter", the jqs.exe binary itself can be used immediately after installation in order to add/remove the "Java Quick Starter" service. The following table shows the command line switches you can invoke with the jqs.exe binary:  C:\Program Files\Java\jre6\bin>jqs -help Usage: jqs <exit code='1605' /mode>[</upgradeoptions>] The following modes are supported: -help print this help message and exit -register install JQS service and register browser startup detectors -unregister <upgrade cmd='msiexec /qn /norestart /x {26A24AE4uninstall JQS service and unregister startup detectors -039Denable enable JQS service -4CA4disable disable JQS service -87B4pause pause prefetching -2F83216012FF}'resume resume prefetching -version print version of the associated Java Runtime Options include: -config <config> set JQS configuration file -profile <exit code='0' /profile> set JQS profile file -logfile <exit code='1605' /logfile> set JQS log file -verbose </upgradelevel> verbose operation <upgrade cmd=' This requires the Windows Offline installation package available from Sun. Note that a particular Java family install package does not remove already installed versions of another Java family, so JRE 1.5 and JRE 1.6 can coexist; all older 1.6 update versions (1.6.0 up to but not including the most recent version) are uninstalled by the following packaging (note that the update version seems to be no more reflected in the last number in the Uninstall ID). Actually, with Update 10 and later Sun has introduced as default the so called "patch in place" update mechanism (see: http://java.sun.com/javase/6/docs/technotes/guides/jweb/otherFeatures/jre_install.html) which automatically removes the previous version of the same Java family (unless you turned off patch-in-place using the installer). So the line that tries to remove a previously installed Update 10 (msiexec /qn /norestart /x {26A24AE4-039D-4CA4-87B4-2F83216013FF2F83216010FF}) is not strictly necessary (if you installed a '><exit code=Family JRE'0and not a ' /><exit Static JRE'). Patch-in-place sometimes fails with "Error 25099. Unzipping core files failed", returning error code1603 from msiexec. Sometimes installation will succeed on a later reboot without any intervention, but sometimes it continues to fail. As of December 2010, the root cause is not known, but Sun/Oracle suggests (at http://www.java.com/en/download/help/error_25099.xml) removing %PROGRAMFILES%\Java\jre6 before retrying installation. A fully-automatic workaround requires the ability to execute commands in response to particular error codes and thus may need to take the form of a batch program wrapped around msiexec. ='1605' == Disable Automatic Update === ===== JRE 6 Update 18 and Newer ===== Since approximately 1.6.18 />6.0 update 18, Sun has included Java Auto Updater as a separate package that is automatically installed with the JRE. You can disable automatic updates by uninstalling the Java Auto Updater after the JRE is installed or upgraded, by adding the following to your package definition: </upgradesource lang="xml"> <upgrade install cmd='msiexec /qn /norestart /x {26A24AE44A03706F-039D666A-4CA44037-87B47777-2F83216014FF5F2748764D10}'><exit code='0' /><exit code='1605' /></upgrade> <upgrade cmd='msiexec /qn /norestart /x {26A24AE44A03706F-039D666A-4CA44037-87B47777-2F83216015FF5F2748764D10}'/><exit code/source> ===== Older Versions ===== 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: <exit codesource lang='1605' /"reg">[HKEY_CURRENT_USER\Software\JavaSoft\Java Update\Policy]"EnableAutoUpdateCheck"=hex:01,00,00,00,d0,8c,9d,df,01,15,d1,11,8c,7a,00,c0,4f,\ c2,97,eb,01,00,00,00,95,1a,3a,6a,da,1d,56,49,9d,23,dc,0e,e8,f5,97,62,00,00,\ 00,00,1c,00,00,00,50,00,61,00,73,00,73,00,77,00,6f,00,72,00,64,00,20,00,44,\ 00,61,00,74,00,61,00,00,00,03,66,00,00,a8,00,00,00,10,00,00,00,bc,f0,2a,6f,\ bb,65,46,e7,e3,c5,06,5e,21,cc,8b,35,00,00,00,00,04,80,00,00,a0,00,00,00,10,\ 00,00,00,67,0c,e5,4a,75,25,eb,4b,33,5a,4a,27,c9,5a,28,39,08,00,00,00,b3,b9,\ a2,ba,f1,81,be,10,14,00,00,00,bd,52,6a,9e,b3,e7,dd,06,89,b1,74,32,0b,e8,25,\ ac,4b,64,1b,99 [HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Update\Policy]"EnableAutoUpdateCheck"=dword:00000000"EnableJavaUpdate"=dword:00000000 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]"SunJavaUpdateSched"=-</upgradesource> <upgrade cmd='msiexec Another way to bypass Automatic Update is to use the MSI Installer. According to http:/qn /norestart www.java.com/x {26A24AE4-039D-4CA4-87B4-2F83216016FF}en/download/help/msi_install.xml you can '><exit code=extract'the MSI Package and pass the options as mentioned above (JAVAUPDATE=0' /><exit codeJU='1605' />0 AUTOUPDATECHECK=0). Worked fine for me with 1.6.18. </upgradesource lang="xml"> <upgrade install cmd='msiexec MsiExec.exe /qn /norestart /x {26A24AE4-039D-4CA4-87B4-2F83216017FF}'><exit codei "%SOFTWARE%\Java1.6\jre1.6.0_18.msi" ADDLOCAL=ALL REBOOT=Suppress JAVAUPDATE='0' /><exit codeJU='16050 AUTOUPDATECHECK=0' /></upgradesource> <upgrade cmd='msiexec /qn /norestart /x {26A24AE4== JRE on 32-039Dbit Hosts === The following installs the JRE and then removes the "Java Quick Starter" service; if you want to keep "Java Quick Starter" service then just remove the line with "jqs.exe -4CA4-87B4-2F83216018FF}'>unregister", but remeber to stop/kill JQS before uninstallation. <exit codesource lang='0' /"xml"><exit codepackage id="java6" name="Java Runtime Environment 6" revision='1605' /"%version%" reboot="false" priority="100"> <variable name="version" value="24" <check type="uninstall" condition="exists" path="Java(TM) 6 Update %version%" /upgrade>   <upgrade install cmd='msiexec taskkill /qn f /norestart im jqs.exe /x {26A24AE4-039D-4CA4-87B4-2F83216019FF}im iexplore.exe /im firefox.exe'><exit code='0' /><exit code='16051' /><exit code='128' /upgrade></install> <upgrade install cmd='msiexec /qn /norestart /x {26A24AE4%SOFTWARE%\jre\jre-039D6u%version%-4CA4windows-87B4-2F83216020FF}i586.exe /s REBOOT=Suppress'/> <exit codeinstall cmd='0%COMSPEC% /C if exist "%PROGRAMFILES%\Java\jre6\bin\jqs.exe" "%PROGRAMFILES%\Java\jre6\bin\jqs.exe" -unregister' /> <exit code='16051' /> </upgradeinstall> <upgrade install cmd='msiexec %COMSPEC% /qn /norestart /x {26A24AE4C if exist "%PROGRAMFILES(x86)%\Java\jre6\bin\jqs.exe" "%PROGRAMFILES(x86)%\Java\jre6\bin\jqs.exe" -039D-4CA4-87B4-2F83216021FF}unregister'> <exit code='01' /> <exit code='1605' /></upgradeinstall> <upgrade install cmd='msiexec /qn /norestart /x {26A24AE44A03706F-039D666A-4CA44037-87B47777-2F83216022FF5F2748764D10}'><exit code='0' /><exit code='1605' /></upgrade>
<upgrade cmd='taskkill /f /im jqs.exe /im iexplore.exe /im firefox.exe' ><exit code='0' /><exit code='1' /><exit code='128' /></upgrade>
<upgrade cmd='%SOFTWARE%\jre\jre-6u236u%version%-windows-i586.exe /s IEXPLORER=1 MOZILLA=1 ADDLOCAL=ALL REBOOT=Suppress JAVAUPDATE=0 JU=0 AUTOUPDATECHECK=0' /> <upgrade cmd='%COMSPEC% /C if exist "%PROGRAMFILES%\Java\jre6\bin\jqs.exe" "%PROGRAMFILES%\Java\jre6\bin\jqs.exe" -unregister'> <exit code='1' /> </upgrade> <upgrade cmd='%COMSPEC% /C if exist "%PROGRAMFILES(x86)%\Java\jre6\bin\jqs.exe" "%PROGRAMFILES(x86)%\Java\jre6\bin\jqs.exe" -unregister'> <exit code='1' /> </upgrade> <upgrade cmd='msiexec /qn /x {4A03706F-666A-4037-7777-5F2748764D10}' />
<remove cmd='msiexec /qn /x {26A24AE4-039D-4CA4-87B4-2F83216023FF2F832160%version%FF}' />
</package>
</source>
====Install JRE with msi without removing old version in a mixed 32-bit/64-bit environment====
On 64-bit hosts installing the exe doesn't work.
</source>
====Disable Automatic Update==== ===== Latest Version ===== Since approximately 1.6.18 / 6.0 update 18, Sun has included Java Auto Updater as a separate package that is automatically installed with the JRE. You can disable automatic updates by uninstalling the Java Auto Updater after the JRE is installed or upgraded, by adding the following to your package definition: <source lang="xml"><install cmd='msiexec /qn /x {4A03706F-666A-4037-7777-5F2748764D10}' /><upgrade cmd='msiexec /qn /x {4A03706F-666A-4037-7777-5F2748764D10}' /></source> ===== Previous Versions ===== 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: <source lang="reg">[HKEY_CURRENT_USER\Software\JavaSoft\Java Update\Policy]"EnableAutoUpdateCheck"=hex:01,00,00,00,d0,8c,9d,df,01,15,d1,11,8c,7a,00,c0,4f,\ c2,97,eb,01,00,00,00,95,1a,3a,6a,da,1d,56,49,9d,23,dc,0e,e8,f5,97,62,00,00,\ 00,00,1c,00,00,00,50,00,61,00,73,00,73,00,77,00,6f,00,72,00,64,00,20,00,44,\ 00,61,00,74,00,61,00,00,00,03,66,00,00,a8,00,00,00,10,00,00,00,bc,f0,2a,6f,\ bb,65,46,e7,e3,c5,06,5e,21,cc,8b,35,00,00,00,00,04,80,00,00,a0,00,00,00,10,\ 00,00,00,67,0c,e5,4a,75,25,eb,4b,33,5a,4a,27,c9,5a,28,39,08,00,00,00,b3,b9,\ a2,ba,f1,81,be,10,14,00,00,00,bd,52,6a,9e,b3,e7,dd,06,89,b1,74,32,0b,e8,25,\ ac,4b,64,1b,99 [HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Update\Policy]"EnableAutoUpdateCheck"=dword:00000000"EnableJavaUpdate"=dword:00000000 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]"SunJavaUpdateSched"=-</source> Another way to bypass Automatic Update is to use the MSI Installer. According to http://www.java.com/en/download/help/msi_install.xml you can 'extract' the MSI Package and pass the options as mentioned above (JAVAUPDATE=0 JU=0 AUTOUPDATECHECK=0). Worked fine for me with 1.6.18. <source lang="xml"><install cmd='MsiExec.exe /qn /i "%SOFTWARE%\Java1.6\jre1.6.0_18.msi" ADDLOCAL=ALL REBOOT=Suppress JAVAUPDATE=0 JU=0 AUTOUPDATECHECK=0'/></source> ===Installer Command-line Switches===
These have changed from JRE 6 Update 10 and onwards.
http://java.sun.com/javase/6/webnotes/install/jre/silent.html gives the following list but it may or may not be complete:
* /lang=<language ID>, if used, sets the localized language for the installer (see language IDs)
* SYSTRAY=0, if used, if set to zero, Java won't show an systray icon when loaded.
Previous versions had these The following switches available which may or may not be appropriate are deprecated for JRE 6 Update 10 and onwardshigher:
* IEXPLORER=1
* MOZILLA=1
117
edits

Navigation menu