Skip to main content

JRE cache/updates stored in wrong location in Windows profile

No replies
Joined: 2010-03-02

I've sent this as a complaint/bug report on but who knows what happens to those messages. Let's try somewhere more public as well..

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..

Also I am using Java's bad habits on Wikipedia to demonstrate how much unnecessary bloat a poorly designed 3rd party software can add to Windows roaming profiles.

So the question for the forum.... Does any JRE engineer at Sun/Oracle really read comments posted here?

- Dale Mahalko