How do I deploy Java using Active Directory across a network?

This article applies to:

  • Platform(s): Windows 8, Windows 7, Vista, Windows XP, Windows 2000, Windows 2003
  • Java version(s): 6.0

This help page is intended for network administrators. It is assumed that you have sufficient knowledge to perform the technical steps.

The information on this article describes an unsupported practice. Oracle Support Customers must use the installers provided by Oracle to receive support on installation issues.

Extract the .msi file from the installer

Follow these steps to extract the .msi file from the installer for deployment through Active Directory based network:

  1. Download and launch in GUI mode the Windows Offline Installation executable (.exe) file.
    (GUI mode is active by default unless silent mode option ‘/s’ is specified)
  2. When Welcome to Java window appears do not click Install button and navigate to LocalAppData folder (the user Application Data folder). The location of the LocalAppData folder differs for each Windows platform.

    Note: You can also navigate directly to APPData folder by typing : %APPDATA% in Windows Explorer Address Bar or Run.

    • Windows Vista and Windows 7
    • Windows XP
      C:\Documents and Settings\<user>\Local Settings\ApplicationData\Sun\Java\jre<version_number>
    • Windows 2000
      C:\Documents and Settings\<user>\ApplicationData\Sun\Java\jre<version_number>

    jre<version_number> folder contains two files: and
    Example: For jre 6u43, jre<version_number> is 1.6.0_43 so Sun\Java folder contains
    jre1.6.0_43\ and

  3. Copy *.msi and *.cab files to your temp location.
  4. Click Cancel button in Welcome to Java window. There is no need to continue installation after msi and cab files got extracted.


    From your temp location, you can use Active Directory to distribute the Java




     files to as many client Windows platforms as you want.
Things to note during deploy process:
  1. Cab file just needs to be in the same directory as msi file. For example to run msi installation for jre 6u43 with msiexec.exe tool, admin user just needs to specify a location of msi file:
    msiexec.exe /i c:\msi_temp_dir\jre1.6.0_43.msi and Cab file needs to be in the same directory.
  2. For jre older than 6u10 Sun\Java\jre\jre<version_number> folder contains msi file only. cabfile is packed inside msi file.
  3. For jre older than 6u34 build 03 msi and cab files don’t get deleted fromApplicationData\Sun\Java after completed installation so there is no need to extract msi and cab files when Welcome to Java window waits for user input.

For more information please visit Java Deployment with Active Directory.

Uninstallation with MSIEXEC.EXE command

Method 1 (Specify original msi file)

In order to uninstall a Java specify /x parameter and msi file name (with a full path) which was used previously to perform an installation of that particular Java version.
Example: Command for Uninstall of Java version 6 Update 43 is
msiexec.exe /x c:\msi_temp_dir\jre1.6.0_43.msi 

Method 2 (Specify GUID)

The command to uninstall is msiexec.exe /qn /x {GUID}
Note: To find a GUID for a specified Java version installed on the system go through registry:
For each found key check InstallProperties sub-key. If DisplayName property matches the Java version you want to uninstall then, UninstallString contains the complete uninstall command with GUID number.
Example: For Uninstall of Java version 7 Update 40
Navigate to [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\
there is a product: 4EA42A62D9304AC4784BF238120704FF
under InstallProperties key of that product there are:
DisplayName=Java 7 Update 40
UninstallString=MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83217040FF}
Once you have collected these information now Run following command to uninstall this version of Java.
Command to Uninstall in GUI modeMsiExec.exe /x {26A24AE4-039D-4CA4-87B4-2F83217040FF}
Command to Uninstall in silent modeMsiExec.exe /x {26A24AE4-039D-4CA4-87B4-2F83217040FF} /qn