United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6396594 : Vista: plugin cannot write to default cache directory

Details
Type:
Bug
Submit Date:
2006-03-10
Status:
Closed
Updated Date:
2010-04-04
Project Name:
JDK
Resolved Date:
2006-10-31
Component:
deploy
OS:
windows_vista,windows
Sub-Component:
deployment_toolkit
CPU:
x86
Priority:
P2
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:

Related Reports
Backport:
Backport:
Duplicate:
Duplicate:

Sub Tasks

Description
In Vista, IE runs in a special protected mode. When running plugin applets in IE, when we try to store resources into the default cache directory in the user's home, it will get redirected to another folder under the user's temporary internet files. So later if the user wants to view the cached resources via java control panel, the cache viewer will show nothing in the cache because the cached resources are not store in the default location.
This also prevents the sharing of cached resources between webstart and plugin.

Applet still runs fine in IE7.

We need to investigate and see where should we move the default cache directory when running vista.

                                    

Comments
EVALUATION

I tried to move the deployment infrastructure directory to the "low" directory as returned by SHGetFolderPathEx function (with FOLDERID_LocalAppDataLow as argument).

But even this path, when in IE protected mode, it still got redirected to another virtualized directory.

I found that if we set the deployment infrastructure directory to:

c:\Users\ngthomas\AppData\Local\Microsoft\Windows\Temporary Internet Files\Virtualized

Then both webstart and plugin cache can co-exists there; no re-direction even in protected mode.

But I couldn't find a win api that will returned this path yet; and i am not sure if this will works in all different editions of Vista.

More investigation is needed.  Another possible approach is to elevate plugin to run in "intermediate" or "high" mode, same as webstart.
                                     
2006-03-15
SUGGESTED FIX

http://web-east.east/deployment/www/webrevs/ngthomas/6396594/webrev/
                                     
2006-04-28
EVALUATION

For Java 6+ and Java 5u11+, when running on Vista, the deployment home directory (where cache, log, etc is located) will now be under the user's appdata/locallow directory:

c:\Users\<username>\AppData\LocalLow\Sun\Java\Deployment\

This directory can be written by both Java Plug-in and Java Web Start, without any redirection, even under IE protected mode.

We obtain the path to the user's locallow directory using windows API:

SHGetFolderPathEx with argument FOLDERID_LocalAppDataLow
                                     
2007-01-31



Hardware and Software, Engineered to Work Together