JDK-6931370 : Install/AU should be friendly to roaming profiles
  • Type: Bug
  • Component: install
  • Sub-Component: install
  • Affected Version: 6
  • Priority: P2
  • Status: Closed
  • Resolution: Won't Fix
  • OS: generic
  • CPU: generic
  • Submitted: 2010-03-02
  • Updated: 2016-07-05
  • Resolved: 2016-07-05
Related Reports
Relates :  
Description
Note: items 4 and 5 will be covered by separate bug report for common deployment.
      

==========
When Java installs on a Windows computer, it stores its updates, cache, and temporary files in the wrong data location.

On Windows there is this technology known as Roaming User Profiles. When a domain user logs in on the network their user profile is copied from the server to the local computer. When they log off, the profile copies back from the desktop to the server. This allows the user to go to any domain joined computer, log in, and their desktop and documents follow them to that computer.

Microsoft's way of handling temporary application files and other temp files is to create a special section of the profile for temporary data. This location may store as much data as necessary but does not copy back and forth to the network. On Windows XP this is called "\Local Settings\Application Data" and "\Local Settings\Temp" in each user profile, and is usually a hidden and/or a protected system folder.

However many 3rd party companies apparently do not understand how roaming works or its limitations, and Java really screws it up. JRE stores nothing in the Local Settings section and puts everything into the roaming side, which can total a couple hundred megs and adds to the roaming login/logout delays.

Meanwhile, it appears that most Java updates don't delete themselves after they install, each one leaving behind a 10-25 meg drag on the user's roaming login and logout times every time an update downloads to be installed. 

======

The fix:

1. Delete all old updates stored in "\{user}\Application Data\Sun\Java\JRE1.6.0_xx\" and any other old ones

2. Check local user permissions before downloading a JRE update. Someone who is not a member of the Administrators group will not have install permission, so there is no point downloading an update they will not be able to install, and may be deleted from the user's local settings, when the roaming account logs off. 

3. Store local machine updates locally in "\{user}\Local Settings\Application Data\Sun\Java\" and delete when done with them


4. Remove anything from "\{user}\Application Data\Sun\Java\Deployment\" that is not a user or JRE preferences file. (This means delete "Deployment\Cache\")

5. Store the deployment cache locally only, in "\{user}\Local Settings\Application Data\Sun\Java\Deployment\Cache\"

On Vista/Win7 the profile directory layout does change somewhat so the storage locations may be slightly different for those Windows versions. Generally using the registry locations for user profile folders should put the temp files and updates in the right temporary spot..

Comments
The bug, as written, is NA for JDK9 implementation.
05-07-2016

MSI Compliance/enterprise project.
11-06-2013

EVALUATION We can look into fixing this in a future 6u2X update release or Java 7.
16-03-2010

EVALUATION CSIDL_APPDATA would be replaced with CSIDL_LOCAL_APPDATA or CSIDL_COMMON_APPDATA where appropriate.
02-03-2010